WordPress.org

Ready to get started?Download WordPress

Forums

Thumbnail in Search Results. Possible? (2 posts)

  1. actionbasic
    Member
    Posted 6 years ago #

    Hi all. I want to pull thumbnails into the search results for my site....anyone know the code for this?

    Thanks in advance.

  2. Omarvelous
    Member
    Posted 6 years ago #

    If you look in your template's Search.php, you'll see that the content of the post in the loop are of the RSS version, which is the reason for the lack of html in the search results.

    <?php the_content_rss('', TRUE, '', 80); ?>

    So, you could use the same

    <?php the_content('More'); ?>

    used in your index.php or home.php file, where your reg post are, to get the same looking search results as if they were viewing your reg post.

    I'm sure there are other variables that you can use.

Topic Closed

This topic has been closed to new replies.

About this Topic