Forums Forums Search & Filter Pro Hide excerpt on search result page

Viewing 8 posts - 1 through 8 (of 8 total)
  • Anonymous
    #221728

    Hi guys

    For a page such as /search/?_sf_s=iphone my goal is to hide the excerpt for all the search results. I would like to show the title there only.

    Which file do I have to edit in order to achieve this?

    Thanks a lot and best regards
    Michael

    Trevor
    #221735

    Are you able to send me a live link/URL to your search page so I can take a look?

    Anonymous
    #221764
    This reply has been marked as private.
    Trevor
    #221826
    This reply has been marked as private.
    Anonymous
    #221828
    This reply has been marked as private.
    Trevor
    #221857

    As an aside, that form has two search boxes, which is not permitted (or at least, will not work to combine them).

    However, the form uses the ‘As an Archive’ Display Results Method, and you will (should) have specified a theme template file to use to display the results.

    You will need to edit that template file (taking care to use a child theme, copy the file to the child theme folder, rename it, tell our form the new filename) so that it doesn’t output the excerpt.

    Anonymous
    #221861

    I know that multiple fields of the same type are not a good idea (will be fixed soon).

    Is having a specific theme template the only solution to this?
    It sounds quite complicated to me.

    Could you please walk me through and provide some more details on how to do it?
    I always very careful before editing theme files, however, a child theme is already in place.

    Trevor
    #221865

    Generally, a template has to be used to display results. If you don’t want to edit a theme template, you would need to use our Shortcode display method. The guide for customization is here:

    https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results

    You need to find this line:

    <p><br /><?php the_excerpt(); ?></p>

    and remove it, along with the other parts you do not need.

    You can edit pretty much anything in this file, but make small changes and test.

Viewing 8 posts - 1 through 8 (of 8 total)