Forums

content shown based on user role? (3 posts)

  1. calvinhsu
    Member
    Posted 1 year ago #

    since we can let wp decide whether to show certain content based on the user login status, is it also possible to do this based on user role? e.g. show the link to backend to Contributor+ users, but subscribers don't see the link.

  2. vtxyzzy
    Member
    Posted 1 year ago #

    Not clear exactly where the link is shown. If you have access to the code that shows the link, you can use an if-test based on the user's role or capability using the current_user_can function.

  3. calvinhsu
    Member
    Posted 1 year ago #

    @vtxyzzy Thanks, your reply helps.

    I'm building a site using wp+bp, I want to make the backend of the main blog available only to selected users rather than everyone who has registered, since subscribers have little to do in wp backend.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags