if( !in_array('Aggregator', get_the_author_meta('roles')) ){
//If user is not aggrigator display the info
}
That will get the authors roles as an array for the current post. You can pass a post id along with the ‘roles’ to get the data from another post.
Also note that your Aggrigator role is possibly set-up in word press in lower-case so make the if statement reflect this.
Related Posts:
- Enable comments for post with comments meta box removed
- Custom post type – no layout section of Document tab, and no author choice
- Creating teams of users in WordPress
- Tips for using WordPress as a CMS? [closed]
- Custom Post Type Templates from Plugin Folder?
- How to Remove Certain Screen Options and Meta Boxes from add/edit post type?
- How to prevent a post from being deleted?
- Creating a default Custom Post Template that a Theme can override
- WordPress Capabilities: edit_user vs edit_users
- Jetpack plugin (ShareDaddy): Prevent share buttons showing on custom post types?
- How to assign user a role if none is present when logging in
- How to make a list of companies’ information and display them to user, using custom post types and a custom taxonomy?
- How can I let users to access plugin functions based on roles?
- Seriously stuck with some custom meta box/plugin stuff
- Restrict backend but allow to use post.php?action=delete&post=POSTID from front-end
- [Plugin: Posts 2 Posts] reciprocal connections
- Custom Post Type Statuses
- How to Build a Movie Library in WordPress 3.x
- How do I get multiple pages by title?
- How can I change plugin to give access to editor user role?
- add_meta_box Callback not being called
- I need to add a custom “cover” to every new post — plugin or custom setup?
- Star rating for custom post types [closed]
- How to Make a Custom Grid View
- wordpress reusable content blocks
- Allow users mark posts as “complete”?
- Is there a way to order posts and custom post types as one group?
- dynamically generating plugin syntax
- Duplicate posts when posting nulls in records in phpMyAdmin [closed]
- Loco Translate: Custom Post and Custom Taxonomy Labels not translated in wp-admin menu
- How to make a customize role and view a specific plugins base on that role?
- Accessing post’s meta data based on user’s click of a post
- Hook to plugins admin settings
- Plugin custom post type – Internal server Error
- Exclude post by custom meta with pre_get_posts
- get_post_type() and WP_QUERY issue
- List taxonomy terms for post as checkboxes
- Filter custom posts based on the user role of author
- Creating a custom post type, adding custom meta fields, preventing all future editability of posts of this type
- How to allow an editor to edit all WordPress blog posts but have the last say as administrator?
- How to create restrict content to users (by user, not by role)
- How to create user that has permission to create new sites on WordPress with multisite option enabled?
- Mq translate plugin custom post type issue
- Can I allow certain people to add/edit pages within a parent?
- can i limit editing specific custom fields to certain roles?
- WordPress custom taxonomy not showing
- Using ACF default value to autoincrement a number field
- Add user role to generated plugin
- Allow only Admin role to access plugin settings/options page
- How to Resize the Custom Post Images?
- How to use template_include hook with form submission?
- Trying to add a page template for my custom post type from a plugin, but it will not display in the template dropdown unless file is in theme
- Custom shortcode for displaying user based on a role parameter
- How I can change the required capability for an admin menu without editing the plugin file?
- posts from multiple post types in one slider
- Custom Post Type – custom form in dashboard
- $pages = get_pages(‘child_of=’.$post->ID); Why arguments are concatenated?
- Show WordPress Plugin Menu(Admin) To Editor
- WP-API Custom Post Type json_no_route
- How can I list custom post type categories of portfolio
- Plugin generated unexpected output – No PHP errors
- Use jQuery Datepicker code from plugin
- Posts 2 Posts: Display custom types connected to the same other custom type but with another connection
- Including content from legacy app: via plugin or custom content?
- Dictionary-style definition list plugin
- Plugin Hook When New Author Added
- Error Metabox Warning: call_user_func() expects parameter 1 to be a valid callback
- Import Recent Posts Only and Ignore old ones if exist
- WordPress REST API: Query media files attached to a custom post type
- How to get the custom field value using SQL query
- Setting Author on CPT
- Create category for each user
- How to display the category name in the tab and post inside the tab in WordPress?
- Want to build parent-child relationships between custom post types created with CPT UI
- custom post type plugin error [closed]
- Add an action based on custom post meta field
- Merging new theme and plugins from development site to production
- Ultimate Members Default Post Layout problem
- how to create user profile pages and display them based on users roles
- Allow editor user to full permission to access plugin settings
- Is it possible to customize a wordpress post from outside dashboard(Something like site.com/post-type/post/?e=post_id)?
- Public WP website with one area just for members
- User / membership Plugin [closed]
- Overwrite user role
- Run only on plug-in activation instead of wp_head
- Defined user role to access plugin’s pages
- Calling an custom field from theme option at the frontend
- Creating themes using the one Plugin (Toolkit)
- How to add jquery to my custom post type wp plugin
- WordPress list child pages of custom post type
- making a glossary with wordpress
- Create custom fields on a post
- Synch Custom Post Types (and Custom Fields, Cats, etc.) Between WordPress Sites
- WordPress Custom post type won’t save properly
- Remove base from the custom post type URL [duplicate]
- Display Custom Post Type and Custom Taxonomy Data on Front End Using Only a Plugin
- WordPress show different custom post type
- How to disable plugin capability : “create new category”
- Links not opening as they should. Custom WP plugin
- How to make content as required in custom post type?