• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2665

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Support
  • Newsletter
  • Videos
  • Log in

Premium Member? - Request custom code

Genesis Custom Search Results Page

In this post, i’ll show you how easy it is to create your own custom search results page template for Genesis.

The results page this code creates is only displayed when using the built in native WordPress search widget or function.

Customize Search Results Page

Installation Steps #

There’s 3 code blocks connected together in this Gist.

  1. Firstly, Upload the file named search.php to the root directory of your Genesis child theme.
  2. Secondly, copy & paste the PHP code from functions.php to the end of your child themes functions.php file
  3. Last of all, copy the CSS code from the Gist labelled style.css and paste it near the end of your child themes style.css file before the start of your Media Queries.

Code

Register for full access


The code assumes you’re using the Genesis > Theme Settings > Content Archives > Display Post Content settings.

Related Posts

  • Excerpts & Titles Only Genesis Search Results Page Template
  • Genesis Search Results Template You Can Fully Customize
  • Use Custom Field Content For A Custom Post Type In Genesis Search Results
  • Display Different Size Featured Image On Search Results Archive Page
  • Twenty Fourteen Theme: Custom Search Results Page
  • Custom Search Form for Custom Post Type
  • List Titles Only On Search Results Page

Search

Reader Interactions

Comments

  1. tmaarschall says

    March 16, 2016 at 5:45 am

    Hi Brad,

    First of all: thank you for creating this awesome website. Really useful!

    I placed this code in my functions.php:

    add_filter( ‘excerpt_length’, ‘search_page_content_limit’ );
    function search_page_content_limit( $length ) {
    if ( is_search() ):
    return 200;
    endif;
    }

    But I see no change in the content length. How can I make it work?

    My search reslults page: http://huisdierentips.nl/?s=hond

    Also I would like to remove the margin-bottom from the title. Can you tell me how to target the css for the search results page only?

    I already tried a lot of variations like this one:

    .search-results h2.entry-title {
    margin-bottom: 0px;
    }

    But that doesn’t work.

    Best wishes,

    Tycho

    Log in to Reply
    • Brad Dalton says

      March 16, 2016 at 5:30 pm

      1. The code only works if you have configured the Content Archive settings to display excerpts. It won’t work if you are using the content limit.

      Use this code to modify the content limit.

      2. Try

      .search-results h2
      Log in to Reply
  2. Charla says

    November 24, 2014 at 4:02 pm

    Brad, thank you, your instructions here were just what I needed.

    (now comes the however…)
    My html5 & responsive theme (News Pro) renders the mobile view with the results squeezed onto the left half of the screen which doesn’t work well.

    Is there a simple fix for this? I hope, I hope.

    Log in to Reply
    • Brad Dalton says

      November 24, 2014 at 10:49 pm

      Hello Charla

      You may need to modify the CSS in the Media Queries to get it working the way you want on different sized screens

      Log in to Reply
  3. Yael Reinhardt-Matsliah says

    April 5, 2014 at 6:15 pm

    Thank you, Brad, this really helped. As a new “coder’ your tutorials are very helpful! Thank you.

    Log in to Reply
  4. SarahBennetMills says

    April 1, 2014 at 12:15 pm

    Hi Brad!

    I daily visit your blog.Am so addicted of it. I have no words to describe how helpful your tutorials are. Anytime I got stuck with genesis. I simply land to your blog and the solution is always here. I am looking forward for blueprint page tutorial. I hope to see that live on wpsites asap.

    Regards

    Log in to Reply
    • Brad Dalton says

      April 1, 2014 at 12:40 pm

      Hello Sarah

      Thanks for the nice words.

      Yes i need to write up a blueprint so thanks for reminding me.

      Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

PHP Code

template_include

get_body_class

if else

array

class_exists

foreach

sprintf

add_action

printf

variable

Advertise · WPEngine · Genesis · Log in

  • How Premium Membership Works
  • Sign Up
  • Support
  • Subscription Details/Invoice
  • Tagged Tutorials
  • Access-Download Problems