I am using the plugin Top Contributors. That's very helpful for all blogs. But the problem with this plugin is: it is not integrated with custom post types.
How could I extend the plugin to do that?
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.
Sign up to join this communityI am using the plugin Top Contributors. That's very helpful for all blogs. But the problem with this plugin is: it is not integrated with custom post types.
How could I extend the plugin to do that?
This plugin hasn't been updated in almost two years, so you should consider finding a new one.
That said, in this cases you have to open1 the plugin files and search for some string related to your issue, e.g., post_type
.
You'll find that in the file functions.inc.php
, it has two occurrences of:
AND a.post_type = 'post'
Change that to:
AND ( a.post_type = 'post' OR a.post_type = 'YOUR_CPT_SLUG' )
Not sure if that's the only thing that needs to be changed, but now you should be able to further inspect it and locate other parts that need modification.
Best Solution is Top Authors Its support CPT now. http://wordpress.org/support/topic/custom-post-type-support-2?replies=3#post-3967338