• 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

Twenty Fourteen Theme: Custom Search Results Page

The Twenty Fourteen default theme for WordPress includes a search.php file which includes several template tags.

Here’s the default search page which includes the featured image and entry meta.

default search

If you want to customize what displays on your search results pages, you will need to copy over the search.php file to a child theme.

Inside the search.php file you’ll find a loop which includes this template tag:

get_template_part( 'content', get_post_format() );

To modify what the content.php file does in your search results loop, copy over the content.php file to your child theme and rename it to something like customsearch.php.

Then change the above line of code to:

get_template_part( 'customsearch' );

Now you can modify the code in your customsearch.php file to customize the functionality of your search results page and even style it differently to the default.

The Code

Here’s the code for the 2 files you need to create in your child themes root directory.

Example of Customized Search Page

Here’s a very basic example of how you can customize your search results page using the Twenty Fourteen theme.

Here’s what the above code produces:

custom search page

Related Tutorials

  • Genesis Custom Search Results Page
  • HTML 5 Custom Search Form for Custom Post Type

Twenty Fourteen Theme

Reader Interactions

Comments

  1. John Tricoli says

    July 29, 2014 at 11:49 pm

    Hi, I’m running twenty fourteen and I am trying to get my search results to show full screen…in other words have the left sidebar disappear when the search results show.

    The search results are full screen on an ipad, but on a desktop the left sidebar always shows up.

    I’ve tried Fourteen Extended, but the full screen / search results option is not working.

    I have a child theme, and I am just trying to figure out the syntax. Can anyone help me? Thanks!

    Log in to Reply
    • Brad Dalton says

      July 30, 2014 at 2:46 am

      Hello John

      My quote is $65 to code a custom template for you which displays full width on the desktop

      Log in to Reply
      • Jessica says

        December 19, 2014 at 2:28 am

        Is there a way to have the comments looped as the search results? I have only found one plugin yo do this and I’m told its bogging down my site, an the search is super slow. Perhaps it’s because we have nearly 400K (not a typo) comments on our home page…but the comments themselves *are* our content. Pretty much, primary content is user generated by commenting. Also looking for a developer to partition comments table.,.

        Log in to Reply
        • Brad Dalton says

          December 19, 2014 at 2:32 am

          What theme are you using?

          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
 

Loading Comments...
 

You must be logged in to post a comment.