By giving each role the edit_others_posts
capability, plus allowing each role to edit only one CPT, you actually getting what you want. no need to check anything about other users capabilities this way.
Maybe what you’re missing is having a different capability set for each post type. e.g: if you have CPT called books
you can create a custom capabilities corresponding only with books
, edit_others_books
for instance. It’s very easy to code, you can read more about it here:http://justintadlock.com/archives/2010/07/10/meta-capabilities-for-custom-post-types
Hope it’s helpful.
Related Posts:
- How to return results of a get_posts() in explicitly defined order
- Help to condense/optimize some working code
- Is it better practice to use query_posts, WP_Query, or get_posts to create various custom loops within a Page?
- how could I get the pagination as I want to when query posts using get_posts function
- Post count per (day/month/year) since blog began
- How to get 4 Posts after the 5 most recent ones
- making random query button using $_GET
- how to exclude “featured” posts from the main loop?
- Show Only Posts Owned By Logged In User + my post
- WordPress pagination with get_posts?
- My post repeats itself on the second page [closed]
- get_the_title outputs title until spacing; it does not get full length of title
- WordPress query reverse order
- Multiple posts/pages in one page?
- Posts being viewed
- Querying a query
- Show posts from specific roles
- Post per page not working
- query_posts works while get_posts doesn’t
- When to use WP_query(), query_posts() and pre_get_posts
- Why query_posts() isn’t marked as deprecated?
- how to query posts by category and tag?
- How do I query by post format in WordPress 3.1
- Query Posts or Get Posts by custom fields, possible?
- How to set posts per page using WP_Query()
- How do I create a random post that will last for a day
- Custom Post Type “Event”: chronological list of recurring events
- How to get previous 10 days post from a specific date – WP Query
- Order by meta value, pro first, then free
- Having trouble generating pagination links on custom query
- How to create an attachments archive with working pagination?
- Modify theme to get page excerpts on front page
- Counter code for paginated category pages in wordpress
- Author List page: Exclude based on last post date
- Replace query_posts with pre_get_posts
- query_posts sort in multiple directions
- Filter query_posts by tag slug on “Tag Archive” page (when tag is 2 or more words)
- Warning: urlencode() expects parameter 1 to be string, array given in and not getting the preffered output
- Show Posts From Same Category OR Same Tag
- Using database meta_values to calculate new post order using pre_get_posts or a ‘request’ hook
- exclude ids through post__not_in
- Different number of posts on the front page
- Query posts without a specific ID
- Integrating post archive wtih another source and preserving date ordering
- Can I set and show “important” post in my blog?
- Order posts using a custom array
- Custom MySQL Query with logic
- order posts by meta value on posts page
- trouble with query to fetch next and previous posts
- show first 3 thumbnails of posts in different sizes [closed]
- WordPress /page/2 not working
- Simple custom post query for all the posts or many of them not working
- Hook to return true when the_post() is used in a custom while loop
- How to remove a plugin filter’s priority on specific loops (custom queries)?
- Proper syntax to add boolean in array()
- List all posts in a category with query_post() function
- using query_posts to pull posts out of a category in a while loop. Getting odd echo
- Echo a numerical value in query_posts
- why to use query_posts() in custom page?
- Query posts to get all but the most recent post
- Always using the same ARRAY on different querys
- Display trimmed version of the_post()
- Use WP_Query or query_posts() or get_posts() for optimizing a site?
- Modify loop but keep the original query, what am I doing wrong?
- Post per page not working if no category specified
- How do I use pagination in WordPress?
- Does WordPress run a post query when a page is invoked?
- Recent posts on homepage: different thumbnail based on logged in status and post category
- How exclude 3 latest posts of a category in query_posts
- Weird problem on if statement
- How to check a list or feed of all posts under a category and tag?
- Issue with sidebar widgets not showing when I do custom queries
- Why would post_type be ignored in this query?
- query_posts call sets is_home() to true
- Calling Posts from Specified Cat
- Trouble highlighting correct menu parent with wp_nav_menu classes while viewing “single posts”
- How do I add a timezone offset to this query?
- query_posts thumbnail condition
- How to add an “or” instead of and “and” (&) in a WordPress query?
- Latest 5 post excerpts from 5 different authors in Sidebar
- Instead of 4 loops, how can I do it better?
- Modify main loop query for paged and meta key
- wordpress query_posts featured page always on top
- Facing problem with tax_query results
- get posts, run a custom query, and join the results
- Need to add a space after meta value in query_posts in wordpress for zipcode search
- Tax query get first product with attribute value in pre_get_posts
- Help with query_posts function
- Pull new posts using feed
- query_posts() with multiple meta data comparisons
- get_posts and wp_autop (remove filter)
- get_next_posts_link() stops displaying at page 4
- Multiple post queries -category,posts per page,orderby
- How to can I search range of products using between
- Query Posts (post meta)
- Including post data in a sidebar occurring outside of and before the Loop
- get all posts with certain meta data
- show custom post’s post in two different divs [duplicate]
- How do I find the first item in the post array?
- Word count for all posts of all authors