WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Popular Posts
[resolved] Thumbnails not working with php code? (4 posts)

  1. Newfound
    Member
    Posted 1 year ago #

    I've got your amazing plugin showing only on my blog main page (http://www.hothouseblog.org) using the php code. Very cool!

    However, I can't seem to make the code show the thumbnail images; only a list, and I was hoping you could help me figure out what I am doing wrong.

    This is the code that I have in my loop.php file:

    <?php if (is_home()): ?>
    <?php if (function_exists('wpp_get_mostpopular')) wpp_get_mostpopular("range=monthly&limit=3&stats_comments=0&post_type=post&thumbnail_width100&thumbnail_height=60&excerpt_length=55"); ?>
    <?php endif; ?>

    And I did add the suggested code to my functions.php file:

    if ( function_exists('register_sidebar') ) register_sidebar(array( 'name' => 'get_post_list_with_thumbs', 'before_widget' => '', 'after_widget' => '', 'before_title' => '', 'after_title' => '', ));
    add_theme_support( 'post-thumbnails' );

    Is there something wrong with my code? Any troubleshooting suggestions?

    Cheers,

    Daniel

    http://wordpress.org/extend/plugins/wordpress-popular-posts/

  2. H├ęctor Cabrera
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Daniel,

    You're missing an = sign there:

    <?php if (is_home()): ?>
    <?php if (function_exists('wpp_get_mostpopular')) wpp_get_mostpopular("range=monthly&limit=3&stats_comments=0&post_type=post&thumbnail_width=100&thumbnail_height=60&excerpt_length=55"); ?>
    <?php endif; ?>
  3. Newfound
    Member
    Posted 1 year ago #

    That did it! Thanks, Hector :D

  4. Newfound
    Member
    Posted 1 year ago #

    Resolved. :D

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic