Sign in to follow this  
Followers 0

php WordPress Most Popular Posts

1 post in this topic

Posted

I'm using a plugin named "WordPress.com Popular Posts" and it works with JetPack to take advantage of the stats so I can view the most popular posts for up to 7 days or a month.

The only problem I have with it is that it won't give me the thumbnails that are assigned to it, and even if I use the wordpress thumbnail function (see below), I end up seeing 3 of the same thumbnails from the latest post. It's mainly because I can't get the ID of this post view query. Does anyone know how to get this ID so that the thumbnails will display correctly?

<?php WPPP_show_popular_posts( "title=&number=3&days=1&thumbnail_size=220/250&format=<a href='%post_permalink%' title='%post_title_attribute%'>" . get_the_post_thumbnail($post->ID,'thumbnail') . "%post_title%</a>" );?>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.