I found a hacky solution involving redirecting the user:
if ((basename($_SERVER['SCRIPT_NAME']) == 'edit.php')) {
// your code here
$author = wp_get_current_user();
if(isset($author->roles[0])){
$current_role = $author->roles[0];
}else{
$current_role="no_role";
}
if($current_role == 'ai1ec_event_assistant' && ($_GET['post_type']==''&&$_GET['category_name']=='')){
header("Location:/wp-admin/edit.php?category_name=events-list");
}
}
Related Posts:
- Add role that restricts user to post in specific category
- Remove Posts Quick Edit link for specific user role? WP 3.3
- Stop users posting into category while still seeing contents of the category
- How to allow users to post only in certain category and hide elements from edit page?
- allow editor/author to publish others posts but not publish their own
- Add new post only in assigned category
- Authors can edit all posts, except when an owner is specified?
- each user having category with their name and can add sub categories post in that category
- Update post counts (published, draft, unattached) in admin interface
- Manipulate post category after time
- How to get Category Id from Post Id ?
- Categories box not showing on post edit pages
- List only child categories a post is in, of a specific parent category
- Add custom field to all posts in specific category
- is there a better way of combining this?
- How to choose a sort order (for posts) per category? (ideally when creating a new category)
- wp_list_categories link to first post of category instead of calling taxonomy template
- WordPress Child Category Display All Posts
- Allow role to delete posts but block him the wp-admin
- If specific user role then sticky post
- How to Add ‘Post Categories’ to the Dashboard Sidebar
- How only display all post related to category
- Add category to all post by using sql query?
- How to make search for the custom post type?
- Remove the Edit button in posts for permalinks on certain user roles? WP 3.3
- Full Width Main Post
- How to automatically apply a category based on the post title?
- Update a users role based on number of posts published
- Pulling in post category and children within category
- Post categories to pages
- Get attachments for posts that belongs to a specific category
- WP_Query: Mixing category__in and tag__in together
- If in_category not working for multiple single.php pages
- How can I setup a relationship using categories in WordPress?
- User levels and post visibility
- Related posts by category not working right
- Set Default Category to Username
- How to Mysql select a list of posts with meta_values AND all relevant categories?
- Display post category in foreach loop
- Single.php – Get Current Parent Category
- How show categories in admin and get that selected to show posts in index
- if in category but only with post meta
- singular posts using archive styling
- Display selected categories onto post page
- Un-highlight Blog Menu Item when Category Menu Item is Selected
- Change the background of each post according to the category
- Programmatically add posts from specific category to menu
- Post is in descendant category not working in home.php
- How to get posts ordered by using their categories?
- Hide parts of the post content after typing it’s name or searching it by category
- SQL Bulk Move old posts by one author to another category
- load more posts by category
- Get post category as a separate string and url
- Display Related Posts by Category in Random
- How to show category based post in home page?
- How to show beneath posts the full category path?
- How to view all posts (on site, not admin) that are uncategorized?
- How to create a list of links to post with specific category
- Only the most recent post is showing on my category page (working on localhost, not live site)
- Post meta not working
- ACF date picker to trigger category change
- get category in list of posts // shortcode for custom related posts
- Get category slug of the Parent category of a Product
- Featured Story Shortcode not outputting content
- exclude particular category in api
- Make categories appear random
- How to add a ‘News’ section to specific posts in WordPress
- Get Category in save_post Hook
- Administrator Posts
- Get posts from category from custom query
- Changing a users posts to drafts upon role change
- How to show category image if no featured image is set?
- How to show posts ordered by random [duplicate]
- How to Get Position of a Post from a category and tag
- How to run select query of post with category and tags?
- Display new posts categories in separated divs
- Query posts from newest category
- Point users to a specific url directory for some posts
- Static text above category page
- Ajax – Post Categories and Load More
- Remove All in One Seo from Posts for Contributors
- Edit Posts Page but not category specific pages?
- Show only top 3 posts from 3 categories in order on home page
- Multiple Post Repeat for Related Post Loop by Category
- How to organise post by category and date
- Show post if in category
- How to display custom content in post with category XXX
- Displaying categories items among posts
- how to show posts on different pages if number of post per page is one
- Displaying different posts Via wp_list_categories()
- Is possible to create a custom link that creates a post that’s already categorized?
- Is it possible to have different header style blog titles in different categories?
- How to display subcategory articles in the category view?
- Display ONLY Latest Post From Several Categories
- How do we display a certain category type on a page while hiding all others?
- Show all posts in category
- Polylang – display one post into 3 categories with different lang [closed]
- Export Posts Without Categories In An XML File
- wordpress category Description not allowed tag
- Site ‘Categories’: save an admin global setting with post metadata [closed]