WordPress.org

Support

Support » Plugins and Hacks » Hacks » how to display post content for special Role?

how to display post content for special Role?

  • hi
    i have a wordpress website with 1000 post.
    my site have a lot of categories and two kind of rols :freeuser and vip user.
    both of them see all post but in single freeuser don’t see content of special categories but vip can.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Adam
    Member

    @umbercode

    Assuming that you added roles using add_role you can then assign capabilities to these roles using add_cap
    Next it is just a simple conditional to test for these capabilities in your loop using current_user_can

    thanks Umbercode
    but there is a problem here.freeuser should see content of cat a,b,c
    but with this role and cap they can’t see the content.

    is there any plugin or code to restrict content?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘how to display post content for special Role?’ is closed to new replies.