How to display featured images in search results page?

Is it possible to display the featured image of each result item in the search results page ?

Comments

  • Hi,

    because in search, different types of pages display, it is not possible to display featured images unfortunately.

    Thanks for understanding!
  • Thanks for your reply.

    Is it possible to use an external search engine to search in portfolio items and display a page of results based on portfolio template?

    Betheme is a fantastic theme, very versatile and powerful. I love it, but it lacks an image search in portfolio, I use the Searchford plugin to display a live search dropdown windows of thumbnails. It works well, but when you click on Search results, it use the Betheme search, so no images are displayed. You can see it in action on my site :

    http://myngocpierre.fr  (use the sliding top to search a term in portfolio, eg Pierre)

    May be is it possible to generate a portfolio category on the fly with the search term and display it as a portfolio-type?

    Do you intend to improve the search function in the future, for example the possibility to customize the results page?
  • edited July 2015
    At this moment none of these features are not included and it is not possible to do this.
  • I would also like to add an image to the search results page, specifically for woocommerce products. I identified the file search.php in the main theme folder. When it's renamed an image shows. It looks like another template file is being used when this file is not available. Where is the search file that shows the image and can this file be moved to the child theme to show images?
  • @wokabout The file you are talking about you found under theme folder but originally, wordpress is using index.php file and the images appears because WP is using blog page to display search results.
  • Sorry to read that. That's really very dissapointed, neither a picture? a portfolio view?

    In all the themes i have used i have been able to change the options of archive and search someway, sidebar, style of items... :(
  • Looking for the same thing... Any notice?
  • We havent yet done anything with the search results page. I will let the dev team know about it.
    thanks
  • Hi, guys, I’m in no way trying to be a “jump on the bandwagon and say, Me, Too!”, but I own a photography website, and this addition would really help my clients when they are searching through my items. Can a simple update be done to show the image of any page/post type *if* a featured image is present for whatever type the result is?

    I have images for sale in my posts, and when clients type “sunset”, for example, showing a list of sunset photos would be great. Just an idea... however, I really love the BeTheme theme!
  • rkyoungster
    Hey,
    all we can do is to think about adding the featured image to the search results. The wordpress default search that we use could be not enough for your needs. We suggest installing a third party plugin for this.
    thanks
  • Thanks, team. I appreciate it. For anyone else I was able to add images to my searches by adding the following code in the search.php file.

               <div class="entry">

                    <?php
                        if ( has_post_thumbnail() ) { // check if the post Thumbnail
                            the_post_thumbnail('medium-large');
                        } else {
                            //your default img
                        }

                        the_excerpt(); //your short description
                    ?>
                </div>

Sign In or Register to comment.