This code enables you to alter the content shown on the search results page in Genesis child themes. In this example, the default content is replaced with the content you add to a custom field named cpt_search.
This tutorial is based on a request from a member who wanted to create custom excerpts for CPT entries to be displayed on the search results page.
Here’s an example showing the 1st entry on the search results page displaying the custom field content and the 2nd entry showing the default excerpt based on the Genesis > Theme Settings > Content Archive settings :
Watch the following demo video to see how it works :
Demo Video #
Shows custom field content displaying on the search results page if added otherwise the default excerpt is displayed.
Code Installation #
There’s only 1 step :