This thread at wordpress.org – http://wordpress.org/support/topic/content-shown-based-on-user-role – suggests using the ‘current_user_can’ function
This thread – http://wordpress.org/support/topic/display-a-custom-image-only-if-user-role-is-contributor – suggests you can use it like ‘current_user_can(‘contributor’)’ for different roles.
I haven’t tried it but it sounds like it should work.
Related Posts:
- create shortcode to list users with specific meta key value
- Execute a ultimate member action when user role is updated
- How to add array [closed]
- Get users with different roles and call function on each of them (user_meta)
- Custom user role still showing up after deletion, ideas?
- Add Change role button for list of user in an event
- Adding fields to the “Add New User” screen in the dashboard
- How to check if a user exists by a given id
- Use author author display name in permalink structure for pages and posts
- Get a list of all available fields in the User Profile
- Logout redirect to current page – function
- How to paginate the get_users function?
- How to display random users with avatars
- How to manually activate user in dashboard only by admin
- Apply custom role capabilities to administrator (without plugin)
- Add new user : make the fields First Name and Last name required
- Roles & capabilities GUI that does not create separate table
- wp_delete_user with username
- Change labels on ‘Nickname’ and ‘Biographical Info’ in user-edit.php
- Order get_users() by last login date. Is it possible?
- How can I tell when a user is logged in?
- How do I redirect upon login a specific user based on role?
- how to get and display logged in user’s recently read posts
- Displaying a random user with a shortcode
- How to update BuddyPress xprofile fields programmatically? [closed]
- How to detect first visit of a user?
- How to add another user to this remove_menu function?
- Add a new subscriber role using a function
- Can I pass two roles to the function get_users?
- How can I add an image field to BuddyPress Extended Profile Fields? [closed]
- How to test for Super Admin
- Create dropdown of users in admin dashboard
- Custom roles can’t access to wp-admin
- password protected post policy
- Custom registration URL lost when user makes signup mistake
- Custom function for specific user role
- Remove the deleted users avatar from list
- Hide Author.php template from specific user role
- edit role display name and label name without plugins
- Get Current User info using wp_localize_script, in functions.php
- How to add custom fields to my custom registration form
- Don’t delete a page if it holds users
- Toggle User Roles with button
- How to change or add user role after getting post request data about pay? [closed]
- How to make custom column Admin>Users sortable?
- Filter out other users comments. Visualize only own comments and editor role users’ comments
- Force to use STRONG users password and implement rule to prevent REUSE [closed]
- Change label for registration Fields
- Allowing users to view private posts (pending approval)
- Allow Contributor to edit their own posts after Adm aproval
- How to add custom JavaScript in functions?
- Condition OR for current user ID
- How to set default post editor based on role?
- How to Use Global Variables Inside Header and Footer
- Secondary Menu and Logged In Users
- Why get_user_by() doesn’t work in my code?
- load CSS only for administrators on backend
- Adding additional roles on registration
- Filter to wp_list_authors
- The Capability to choose post/page template
- Add Link to Users List (Backend) to open each users front-end profile
- Suggest Users basing on User taxonomy
- Showing user profile data on front-end
- Modify function to only return values for the user that’s logged in
- loginout function customization
- User meta and public function security
- call wp_insert_user in custom class doesnt work
- Show errormessages on wrong username/password on custom loginform?
- referencing the current user in a page i created in wordpress
- Show metadata in users.php – wordpress
- Allow a user or role to view drafts and previews, but not other admin privileges?
- How to load a css file depending on the current role
- Allow user select role in wordpress default registration without plugin
- Deleting guests profile users after 1.5 hours
- Remove check boxes and its label from screen option for custom role
- wp_get_current_user return ID = 0 when used outside of wordpress, such as webhook / fulfillment dialogflow
- Allow user only create specific tags
- get_current_user_id() always return 0 in if else statement
- How to show only specific category post by user role without plugin and restrict all other cats
- Add another role to a user when they click a button?
- Change user role based on total number of items ordered
- Remove all video attachment, both files and post/postmeta from database?
- Show users last read posts for each user?
- delete_user_meta for user in spesific group
- Change the second role depending on the first
- Restrict certain roles registrations by domain
- How to add number to wordpress count function?
- Multisite Admin Roles
- add_role menu pages are not visible
- Get author meta of all writers
- get USER ID in functions.php using user_register action
- Welcome Mails based on user role
- Whats the proper way to add a new user via a front end form?
- Get all users from role and add to dropdown (select) – wordpress, javascript
- Custom Admin Menu Report for Specific User ID
- sort by date in users
- Removing permalink from post thumb in twentyeleven
- Is it possible to limit number of files a non-admin user can upload via the WordPress media library?
- Using Switch Statement to Change Image According to Last Digit of Topic ID
- Help with is_page() and calling css for specific pages in a Child Theme