Support » Plugin: WP Most Popular » Feature Request: Featured Image

Viewing 1 replies (of 1 total)
  • Its not a big thing as you think if you use template tag. Just add
    <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a>
    and use css to show the image the way you want.
    to change the thumbnail size check this link Click here

    the full code

    <?php
    echo '<ul>';
    $posts = wmp_get_popular( array( 'limit' => 10, 'post_type' => 'post', 'range' => 'monthly' ) );
    global $post;
    if ( count( $posts ) > 0 ): foreach ( $posts as $post ):
        setup_postdata( $post );
        ?>
        <li><a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('your_custom_thumbnail'); ?></a><a href="<?php the_permalink() ?>" title="<?php echo esc_attr(get_the_title() ? get_the_title() : get_the_ID()); ?>"><?php if ( get_the_title() ) the_title(); else the_ID(); ?></a></li>
    
        <?php
    endforeach; endif;
    echo '</ul>';
    ?>

Viewing 1 replies (of 1 total)
  • The topic ‘Feature Request: Featured Image’ is closed to new replies.