WordPress.org

Ready to get started?Download WordPress

Forums

Smart Archives Reloaded
[resolved] posts per month not working with custom post types (3 posts)

  1. dereknorrbom
    Member
    Posted 3 years ago #

    Really love the plugin, hopefully i have an easy question, been trying to use the posts per page on a custom post type archive and no matter what i try i cant get it to work.
    Currently using <?php smart_archives('', array('post_type' => 'features', 'posts_per_month' => '3')); ?> Its processing the post type features, but completely ignoring the posts per month and displaying all of em. thanks for your time

  2. scribu
    Member
    Plugin Author

    Posted 3 years ago #

    'posts_per_month' is an argument, not a query variable. The correct call would be:

    <?php smart_archives(
      array('posts_per_month' => 3),
      array('post_type' => 'features')
    ); ?>
  3. dereknorrbom
    Member
    Posted 3 years ago #

    awesome, thanks for the reply. and again, love the plugin. thank you for your contributions

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic