Support » Theme: Simone » How to remove the featured images from search results?

  • Using Simone’s search feature, if I look for a word or phrase which is on a page that has a featured image, in the search results that display the featured image is included, but it is decreased vertically and sometimes this cropping will cut off something important, say, the head of a person (I give an example below). Is there a way to just not include featured images in search page results?

    Here’s my site in progress: http://jimkleinfilmmaker.com/mar2017wp/
    Here’s an example of a search that produces an excerpt with a featured image that’s awkwardly cropped: http://jimkleinfilmmaker.com/mar2017wp/?s=truck

    Thanks for any help!

    • This topic was modified 1 year, 8 months ago by  susantau.
    • This topic was modified 1 year, 8 months ago by  susantau.
    • This topic was modified 1 year, 8 months ago by  susantau.
Viewing 1 replies (of 1 total)
  • UPDATE: This site is no longer “in progress” AND i may have a solution, which I will describe below.

    the correct website url is now: http://jimkleinfilmmaker.com
    example of a search that USED TO produce an excerpt with an awkwardly cropped featured image: http://jimkleinfilmmaker.com/?s=jim

    In search.php, there is a call: get_template_part (content, search). I copied content.php from the parent theme (all my work files are in my child theme) and changed its name (in the child theme) to: content-search.php. Then, in content-search.php, I commented out the following two lines of code:

    line 14 // the_post_thumbnail();
    line 27 //echo the_post_thumbnail(‘index-thumb’);

    I’m a little troubled to be messing around with code without really knowing what I’m doing. But this removed the images, and I checked the W3C validator page for the search results page and there are no unclosed elements or stray end tags.

    I hope this is a good solution.

    • This reply was modified 1 year, 7 months ago by  susantau.
    • This reply was modified 1 year, 7 months ago by  susantau.
    • This reply was modified 1 year, 7 months ago by  susantau.
    • This reply was modified 1 year, 7 months ago by  susantau.
    • This reply was modified 1 year, 7 months ago by  susantau.
    • This reply was modified 1 year, 7 months ago by  susantau.
    • This reply was modified 1 year, 7 months ago by  susantau.
    • This reply was modified 1 year, 7 months ago by  susantau.
    • This reply was modified 1 year, 7 months ago by  susantau.
Viewing 1 replies (of 1 total)
  • The topic ‘How to remove the featured images from search results?’ is closed to new replies.