• Hey guys,

    if I have a shortcode that I want to put on the profile page for users, how do I make this element only visible for specific roles?

    I have a review plugin that I want to be shown on the pages of the profiles, but it should only be shown for the profiles that has ‘editor’ as their role. Therefor I need to hide the “5 star rating” on the profile page for the other user roles.

Viewing 1 replies (of 1 total)
  • Hi,

    what plugin do you use for the review? you may check with the plugin author and see whether a feature of checking user role has been included, or can be added.

    If you are comfortable with php code, you can write a function to obtain current user role before applying the review short code, save in your functions.php file under your theme folder, and hook to one of the action hooks in edit_user.php which is located under wp-admin folder of wordpress installation.

Viewing 1 replies (of 1 total)
  • The topic ‘How to show different content on different user profiles’ is closed to new replies.