Reviewgine Affiliate
[resolved] search.php (2 posts)

  1. mistercomparador
    Posted 2 years ago #

    hi everybody,
    I've 4 post. All of them have a featured image. When I use the search (widget), the results haven't image. Why? Can you help me?

  2. mistercomparador
    Posted 2 years ago #

    Already OK,
    In search.php, I put:

    <?php global $post; $post_featured_image = wp_get_attachment_url(get_post_thumbnail_id($post->ID)); ?>

    after of:

    <?php if(have_posts()) { while ( have_posts() ) : the_post() ?>

    I hope this can help another users!

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic