WordPress.org

Forums

The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

WordPress Popular Posts
Add more than one custom post type to get_mostpopular (2 posts)

  1. Stefan
    Member
    Posted 3 years ago #

    Hi I'm trying to add more than one custom post type (podcast,video) to the following:

    <?php get_mostpopular("post_type=podcast&range=weekly&limit=5&order_by=avg&stats_comments=0&pages=0"); ?>

    Can anyone help?

    Thanks

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

  2. Hector Cabrera
    Member
    Plugin Author

    Posted 3 years ago #

    Hi Stefan,

    Just pass the other post types separated by comma, like this:

    <?php get_mostpopular("post_type='podcast,video'&range=weekly&limit=5&order_by=avg&stats_comments=0&pages=0"); ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress Popular Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic