drakard.com

website design, development and marketing

drakard.com masthead

Limit Posts Per Category

If you’re using WordPress as a general CMS, you may have a situation where you don’t want certain groups of users submitting a potentially infinite amount of posts like they usually can; perhaps they should only be posting once in a particular category, and maybe twice per week in another.

Together with Level 2 Categories and Role Manager, this can limit users without the “Make Unlimited Posts” capability from publishing more than a custom number of posts per so many days within specific categories.

Additional posts are not deleted, but turned into drafts/pending review, similar to what happens when a non-privileged user edits a published posts.

  1. Download the “Limit Posts Per Category” plugin (v0.21)
  2. Unzip and copy the single file to your WordPress blog’s plugins folder (/wp-content/plugins/).
  3. Edit the categories to limit, following the example within the PHP file.
  4. Activate it in the “Plugins” tab of the Admin section.
  5. This will now only let admins post freely in those categories – everybody else will be limited until you create a new capability called “Make Unlimited Posts” with the Role Manager plugin and enable it per each non-admin user you wish to be unaffected by the limiting.

Note that currently the categories are hardcoded in the plugin and need to be hand edited per install. This is mostly because I’m the only one using this at the moment and don’t need to set the categories via WordPress – if anyone else finds this plugin useful (or given enough time anyway) then I’ll make a settings screen and do it properly.

(In other words, this is a rough and ready plugin which needs polishing before it’ll be suitable for general use.)

(Tagged with) Tagged with: plugin

Wordpress Wordpress tips, plugins and themes developed or designed by drakard.com Limit Posts Per Category Prevent Wordpress from allowing a contributing user to publish any amount of posts in any category.

Comments are closed.