Customizing the WordPress search results page

This tutorial goes over how to customize the WordPress search result page. We are going to make the post meta look like the rest of the site and also highlight the searched terms throughout the content of the results page. This will provide a better user experience for your visitors since they will be able to easily scan the content to find exactly what they are looking for on your site.

You need to have an active subscription to view this content.

Register Here!

  • Antonella

    Nice little touch, highlighting the search term. Thanks.

  • Abu Jorhom

    I’ve modified your code a little bit to work for both titles and excerpt and used filters instead.

    Thanks

  • frede_z

    Everything is working great as far as my search results being returned and the searched term being highlighted but for some reason when I perform any search my sidebar ends up below the returned results. My sidebar only ends up below my content on the returned search results page…Any suggestions ? Thanks.

  • Mark

    Please note your missing a semi-colon on the css highlight after the color.

    • Technically, and I am referencing CSS standards the last semicolon is optional. I always like to add one anyway to make everything uniform. Thanks for pointing this out.