[Plugin: WordPress Popular Posts] Updated plugin to include custom post type support
-
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:
[wpp post_type=’post,page,events’]
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!
http://wordpress.org/extend/plugins/wordpress-popular-posts/
- The topic ‘[Plugin: WordPress Popular Posts] Updated plugin to include custom post type support’ is closed to new replies.