Title: Thumbnails not working with php code?
Last modified: August 21, 2016

---

# Thumbnails not working with php code?

 *  Resolved [Newfound](https://wordpress.org/support/users/precipitatejournal/)
 * (@precipitatejournal)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/thumbnails-not-working-with-php-code/)
 * I’ve got your amazing plugin showing only on my blog main page ([http://www.hothouseblog.org](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/](http://wordpress.org/extend/plugins/wordpress-popular-posts/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/thumbnails-not-working-with-php-code/#post-3702549)
 * 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; ?>
       ```
   
 *  Thread Starter [Newfound](https://wordpress.org/support/users/precipitatejournal/)
 * (@precipitatejournal)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/thumbnails-not-working-with-php-code/#post-3702552)
 * That did it! Thanks, Hector 😀
 *  Thread Starter [Newfound](https://wordpress.org/support/users/precipitatejournal/)
 * (@precipitatejournal)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/thumbnails-not-working-with-php-code/#post-3702553)
 * Resolved. 😀

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Thumbnails not working with php code?’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-popular-posts/assets/icon-256x256.png?rev=1232659)
 * [WP Popular Posts](https://wordpress.org/plugins/wordpress-popular-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-popular-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-popular-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-popular-posts/reviews/)

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)
 * [thumbnails](https://wordpress.org/support/topic-tag/thumbnails/)

 * 3 replies
 * 2 participants
 * Last reply from: [Newfound](https://wordpress.org/support/users/precipitatejournal/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/thumbnails-not-working-with-php-code/#post-3702553)
 * Status: resolved