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

WP SITES

2784

Original Genesis Tutorials & 6000+ Guaranteed Code

Snippets

  • Consultation
  • Full Access
  • Log in

Genesis Search Results Template You Can Fully Customize

This template for Genesis, enables you to customize how the search results are displayed on the search results page. The template includes settings in the code which you can easily modify to fully customize the output on the frontend so its different to the standard search results.

The template enables you to:

  • Set the layout
  • Show or remove the featured image
  • Set the featured image size using any default WordPress > Media or added custom image sizes
  • Align the featured image left, right, center or none
  • Display the full content, set content character limit or display the excerpts
  • Customize the read more link for each entry
  • Set posts per page for each result

Template Installation

  • Upload the search.php template to your child theme folder.
  • Add the Optional Code below to your child themes functions.php file.

Here’s the template and code for logged in members:

Register for full access

Related Tutorials

  • Use Custom Field Content For A Custom Post Type In Genesis Search Results

pre_get_posts

Reader Interactions

Comments

  1. Elizabeth DellaSelva-Martinez says

    January 29, 2018 at 3:59 pm

    Ok, I copied this code to my search.php file and added the code to the functions.php file – and I am still getting an excerpt for the search results page when I want the full content. When I activate an alternate genesis child theme and use that search.php file I get the full content displayed. So, I know it has something to do with the child theme that I am using – I completely deleted the archive.php file in case there was something in the archive.php file that was over riding the settings from the search.php file – still no luck.

    So, I’m guessing there is something in the functions.php file, but I am completely baffled because nothing fits or makes sense.

    Any other tips?

    Log in to Reply
    • Brad Dalton says

      January 29, 2018 at 11:25 pm

      Please send me a copy of your child theme so i can look in functions.php

      Log in to Reply
    • Brad Dalton says

      February 1, 2018 at 12:21 am

      Here’s the solution i worked out for you. https://wpsites.net/web-design/show-full-content-on-genesis-search-results-page/

      Log in to Reply
  2. Chris Connaker says

    August 9, 2017 at 10:50 am

    Hi Brad – I’m using this code to show a search form at the bottom of my search result page, but the search for is covering up the pagination buttons. Any idea how to fix this?

    Here is the code I have at the very bottom of my search.php. removing the search form code, enables my pagination to show just fine.

    add_action( 'genesis_after_loop', 'custom_display_search_form' );
    function custom_display_search_form() {
    	echo get_search_form();
    }
    
    //* Run the Genesis loop
    genesis();
    Log in to Reply
    • Brad Dalton says

      August 9, 2017 at 11:00 am

      Hi Chris

      You can change the hook genesis_after_loop to any other hook

      Log in to Reply
  3. Chris Connaker says

    June 19, 2017 at 8:40 pm

    OK, I figured it out that I needed the word “excerpts” rather than “excerpt.”

    Now my question is, how can I add a “read more” link and limit the length of the excerpt shown on the search page? I have it working when I display content using the code above, but when I want to just show excerpts, the read more link doesn’t appear and the excerpts are too long.

    Log in to Reply
    • Brad Dalton says

      June 19, 2017 at 9:44 pm

      You can use the content limit with a read more link or limit the excerpts and add a read more link.

      Try these code snippets

      Log in to Reply
      • Chris Connaker says

        June 25, 2017 at 7:57 pm

        HI Brad – I tried the code snippets, but still no luck displaying Read More link or changing the excerpt length, unless I’m viewing Content rather than the excerpt.

        This is a custom / manual excerpt in the posts (if this matters).

        Log in to Reply
        • Brad Dalton says

          June 25, 2017 at 11:18 pm

          You’ll need custom code for that unless it has already been published somewhere. So you have chosen excerpts and now want to limit it as well as add a read more link? Try this code https://wpsites.net/wordpress-tips/add-custom-read-more-link-to-excerpts/

          Log in to Reply
  4. Chris Connaker says

    June 19, 2017 at 7:39 pm

    Hi Brad – I’m trying to show excerpts on search results. Do I just need to change

    “return ‘content’;” to “return ‘excerpt’;” ?

    Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags