Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am creating a member only wordpress site that will restrict the number of custom posts a user can publish (Custom post type = contacts) based on their role.

I will have 4 roles:

Role 1 = 25 posts;

Role 2 = 150 posts;

Role 3 = 300 posts;

Role 4 = unlimited posts

Is this possible to do with WP hooks?

share|improve this question
    
Where does a user create a custom post in your system? in the default WP Dashboard or do you have a form in the front-end? –  rexposadas Dec 14 '11 at 22:30
    
Only in the backend. –  katemerart Dec 15 '11 at 2:59
add comment

2 Answers 2

up vote 0 down vote accepted

I found this plugin Bainternet Posts Creation Limits witch let you add how meny post a user, role or group can create. The plugin description says:

Main Feature:

  • Limit number of any post type creation.
  • Select Post Status to count. (NEW)
  • Limit number of any post type creation by user Role. (NEW)
  • Limit number of any post type creation by user ID. (NEW)
  • New Limit Rule System (faster and stable).
  • Custom blocked message For each Rule. (NEW)
  • MultiSite Support. (Fixed and works better then before)
  • ADD NEW Links are removed when limit is reached (NEW)
  • 0 Now means ZERO so Its actually blocks the user from creating at all.
  • Shortcode to limit front end post creation (NEW).

It looks like you have a function that matches your question: Limit number of any post type creation by user Role.

share|improve this answer
    
This is perfect! Thanks for finding this for me. Just installed and works as I was hoping. –  katemerart Sep 10 '12 at 3:19
add comment

is this what you're looking for?

http://wordpress.org/extend/plugins/bainternet-posts-creation-limits/

http://cleverness.org/2010/08/13/limit-number-of-posts-per-user-in-wordpress/

share|improve this answer
    
Unfortunately not - the plugin does not work on newer versions of WP and the cleverness.org code only lets you limit per user, not per user type. –  katemerart Dec 17 '11 at 3:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.