[resolved] Search function shows entire pages, not summary (3 posts)

  1. restaurantcritic
    Posted 3 years ago #

    My website is http://www.restaurantcritic.eu, and I have made the site to show pages rather than posts (to look like a website rather than a blog).
    Does anybody know if there's a way to get the search function to show only a summary (a few lines of text) instead of showing the entire page with pictures and everything? I've installed extra search plugins that would sort the results by relevance rather than date, but this hasn't helped with this theme.
    The problem is this theme as I have tried to switch to another theme, and with those other themes, the search results were exactly like I wanted them.

    Thanks for your help

  2. paulwpxp
    Font hero
    Posted 3 years ago #

    Create a child theme.

    After the child theme is installed and activated and running properly.

    1. Copy over content-page.php from parent theme
    2. Rename it content-search.php put it in child theme folder
    3. Inside it, change the_content() to the_excerpt()
  3. restaurantcritic
    Posted 2 years ago #

    Yaaaaaih! It worked! Thanks a lot!
    I did have to make some changes to my header pictures and menu items after installing the child theme, but that went quite quickly, so that wasn't a big deal.
    Thank you very much for your help. Now I'm happier with my website :-)

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic