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.

My site has several different kinds of post types. One of these is Discussions.

The site is completely open and public, but my client has asked that I provide a space where only certain members can have discussions/post comments. Basically, I want only members/authors/editors/whoevers of my site to see/post new Discussions.

I've explored using bbpress and other forum options, but they're all too complicated.

Is it even possible in WordPress to have only registered users see/post to a Discussions post type?

Thanks

Terry

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Template Tags for the rescue

  1. Only logged in users:

    is_user_logged_in()
    
  2. Only logged in users that have a certain capability assigned to their role

    current_user_can($capability)
    
  3. Only logged in users that have a specific role assigned

    current_user_has_role($role)
    
  4. Only logged in users that have a specific capability assigned (to their role) on a specific blog

    current_user_can_for_blog($blog_id, $capability)
    
share|improve this answer
    
Ack. Right. Exactly right. Its always the template tags. Thanks for this! –  saltcod Apr 3 '12 at 19:00
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.