[Support request] major adjustments to search results page

Home Forums Support [Support request] major adjustments to search results page

Home Forums Support major adjustments to search results page

  • This topic has 3 replies, 2 voices, and was last updated 4 weeks ago by David.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2284144
    Franz

    Hi,

    I’d like to do major adjustments to the search results page that can’t be done through hooks, or elements, or CSS (as far as I can figure out). i.e. I’d like to insert advertizing after every third search result, show the results more in a listing style, add something like category color labels to the results etc.

    The themes-function.php of GP refers to ” get_template_part( ‘content’, ‘search’ ); ” –> Can you tell me where I can find the code that’s been used for the search template part? (I assume I can use and modify it then in my child theme …)

    Thanks and kind regards
    Franz

    #2284309
    David
    Staff
    Customer Support

    Hi there,

    if you want to use PHP templates, then make a copy of the content.php template in your child theme and rename it content-search.php. Then you can customize that template purely for your search results.

    In addition to this, if you’re using the GPP Blog module, for things like Columns then there is the option_generate_blog_settings filter you can use to modify those for specific cases:

    https://docs.generatepress.com/article/option_generate_blog_settings/

    #2284953
    Franz

    Thanks, David!

    I’m going to use PHP templates in my case then. Works perfectly well!

    Franz

    #2285131
    David
    Staff
    Customer Support
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.