We had a client who wanted to use this plugin with their custom post types, so I modified the original plugin to support a post_type parameter. You can pass in a single post type, or multiple like so:
wpp_get_mostpopular( “post_type=page” );
wpp_get_mostpopular( “post_type=post,page,events,custom-post-type-name” );
This also works with the shortcode:
The code is up on Github: https://github.com/williamsba/WordPress-Popular-Posts-with-Custom-Post-Type-Support
The only file modified from the original version is wordpress-popular-posts.php. Hope this helps others!
- The topic ‘[Plugin: WordPress Popular Posts] Updated plugin to include custom post type support’ is closed to new replies.