Support » Plugin: WordPress Popular Posts » [Plugin: WordPress Popular Posts] Custom post type support

  • Hi Héctor,

    WordPress-popular-posts is a brilliant plugin and it has a great userbase too. There have been requests of adding support for custom post type and one of my clients needs this feature.

    I have gone thru the code and will work on a patch to add this functionality. If all works well, would you absorb this in your plugin so that others will also benefit from this effort?

    Regards,
    Akshay

    http://wordpress.org/extend/plugins/wordpress-popular-posts/

Viewing 15 replies - 16 through 30 (of 34 total)
  • Hey Hector!

    First of all thanks for your great plugin!

    I was looking around for the custom posts fix and after finding anything that worked well I ended up here. I am glad you sorted that out and if you have a beta version before the official release, I would really appreciate if you share it with us before.

    Thanks!

    Plugin Author Hector Cabrera

    (@hcabrera)

    @raheelayub: what I meant to say is that I made a plugin that does that, just haven’t published it yet 😉 If I ever do, will post it here so anyone can try it out (and probably would upload it to the WordPress Plugin Directory as well).

    @tongas: stay tuned, I’ll be posting it here after I get some stuff sorted out 🙂

    Plugin Author Hector Cabrera

    (@hcabrera)

    Alright, here it is! Please keep in mind that this is a development version and even though I did a full test of everything some bugs might show up.

    There are some new, yet to be documented features in this release. You might want to give them a try and post feedbacks here.

    gracias hector!

    seems to be working fine!

    nice mod to add the possibility of choosing by custom post, page or category!

    thanks!

    Jeff Byrnes

    (@berkleebassist)

    As it’s not immediately clear, if anyone else comes here & wants to use this plugin w/ Custom Post Types, here’s the syntax for a template tag:

    wpp_get_mostpopular('order_by=views&post_type=custom&post_type_name=post-type-name');

    What’s the reasoning behind changing the way post_type usually works in a query (by adding post_type_name as a parameter)?

    Would it not be simpler to say:

    $args = array(
        'orderby' => 'views',
        'post_type' => array('posts','pages','custom-post-type'),
    );
    wpp_get_mostpopular($args);

    OR
    wpp_get_mostpopular('order_by=views&post_type=posts,pages,custom-post-type');

    And ditch the pages parameter altogether. If you want to keep backwards compatibility, setting pages to false or true would simply add it into the post_type array.

    Additionally, you could do what I’ve done in the meantime:
    Change $nopages = "AND $wpdb->posts.post_type = 'post'"; to $nopages = "AND $wpdb->posts.post_type != 'page'";

    … which is really how the pages parameter should work.

    Plugin Author Hector Cabrera

    (@hcabrera)

    Hi geoff,

    This is the reason why I posted the development version here. Different points of view are better than just one (mine), and usually leads to better ideas.

    If you don’t mind, I will use your suggestion instead.

    Thanks for sharing!

    Héctor,
    Go ahead. Love the plugin, so thanks for all of the work so far.

    so can you use one of those options and realase official update? i d like to test it.

    Plugin Author Hector Cabrera

    (@hcabrera)

    The development version posted here is pretty much a Release Candidate. You can give it a try if you want or wait until I release the official version after I’m done with some stuff I’m working on now.

    Hello Héctor,

    will it also be possible to show popular posts of a custom post type with “views” insteaf of comments?

    thx!

    AD

    Plugin Author Hector Cabrera

    (@hcabrera)

    @ad: Yes, it is possible. My plugin tracks this info for custom post type as well. All you need to do is enable the show views option it to show this info.

    Everyone: I’m removing the development version now since all pending updates / changes to the plugin have been done already. Will test it for a few more days and release an official update soon.

    There are a couple of new features not present in the development version posted here that might break stuff once you upgrade to the official version. If that happens, please let me know.

    Thanks for your feedback!

    kowalski

    (@jankowalski)

    hector, make sure to inclue shortcode to filter by custom post type in your next release! Many thanks

    rick4him

    (@rick4him)

    Is this the reason I’m getting this error?

    Warning: Missing argument 2 for standard_process_link_post_format_title() in /home/downsynd/public_html/noahsdad.com/wp-content/themes/standard/functions.php on line 2713

Viewing 15 replies - 16 through 30 (of 34 total)
  • The topic ‘[Plugin: WordPress Popular Posts] Custom post type support’ is closed to new replies.