Custom Post Limits v2.6

I’d lke to announce the official release of the updated Custom Post Limits plugin (v2.6) for WordPress.

Control the number of posts that appear on the front page, search results, and author, category, tag, and date archives, independent of each other, including specific archives.

This release features a reversion to the v2.0 method of post limiting, but with a fix for individual archive limiting (ostensibly the primary thrust behind the v2.5 release, but the approach used in that release caused other conflicts). It also adds the ability to “Reset Settings” and other minor tweaks and code documentation.

The plugin’s official homepage is located at :
http://coffee2code.com/wp-plugins/custom-post-limits.

Comments welcome on this post for this version of the plugin. Comments will be closed once this release has been superseded by another.

Read more for a detailed ChangeLog of the release.

Detailed ChangeLog

These are the detailed changes, some of which may or may not make sense to you depending on your familiarity with the previous features and internals of the plugin.

  • Revert post limiting back to hooking ‘pre_option_posts_per_page’ rather than filtering ‘post_limits’ (fixes bug introduced in v2.5)
  • Fix bug related to individual author/category/tag limits not applying (the primary intent of the v2.5 release, but needed re-fixing due to reversion)
  • Fix bug preventing value of individual limits from appearing on settings page (the value had been saved and used properly, though)
  • Add ‘Reset Settings’ button to facilitate resetting all limits configured via the plugin
  • Internal: add get_authors(), get_categories(), get_tags() to retrieve and buffer those respective values if actually needed
  • Update object’s option buffer after saving changed submitted by user
  • Add PHPDoc documentation
  • Update .pot file
  • Minor documentation tweaks

5 Responses to “Custom Post Limits v2.6”

  1. With version 2.5 (on WP 2.9), on a site I have in development, I had an issue with category archive pages.

    When specific category archive pages were limited with this plugin, to a certain amount of posts per page, and the archive went into several pages, some of the same posts would show up on more than one page. Think this may have been just the last page where this occurred. Where a few posts would show again.

    2.6 has fixed this issue!

    Great plugin.

  2. Roger replied on

    Where can I find version 2.5 to redownload?

    With version 2.5, when I limit the top parent category to 1 post, the page navigation isn’t displayed and with the child categories, I limit it to three posts and the page navigation is displayed if there are more than 3 posts.

    With version 2.6, now the parent category will have a page navigation to all posts to also include the child categories. Grrr!

    I thought maybe the category assigment was the issue, but it wasn’t.

    My heirachy [sp] for each top category: I only have a parent category (top) and 1 level of child categories under it. It doesn’t go any deeper. Each parent category only has one post. Each child categories has many posts.

    Each post only has one category assigned to it (I don’t assign multiple categories to one post).

    So I want to revert, can I have the earlier revision?

  3. My site has been showing 2 posts and I want it to show only 1. I downloaded your plugin and left all fields empty, but my homepage is still showing 2 posts.

  4. Roger: If you really want them, you can find the files for v2.5 here: http://svn.wp-plugins.org/custom-post-limits/tags/2.5/

    When I get a chance I’ll revisit the plugin with your comments in mind to see if the behavior you are describing is an error or expected. Of course, if it is an error I will seek to correct it. v2.6 by all accounts is improvement over v2.5, so it’s possible the behavior you desired was a result of a bug in v2.5. I’ll try to email you in the future if I need more feedback about what you were trying to accomplish.

  5. Jim: Downloading and installing the plugin but without configuring it will not cause any changes to your site. You must specify limits via the plugin’s settings page in order to get the limits you want. Since you haven’t specified any, the default for your site, 2, will continue to be used. If you wish your front page to show 1, you must provide that value into one of the input field for the “Front Page” limit.

Leave a Reply

Please keep these things in mind:
Comments may be moderated.
Don't say obviously spammy words (poker, penis, etc)
Basic HTML allowed: i, b, code
Wrap code examples in code tags.