ashishodich
Forum Replies Created
-
Hi Priya,
This method I know, But I want to add category to event based on rolewise using custom code as like following
`function remove_default_category($ID, $post) {if( is_user_logged_in() ) {
$user = wp_get_current_user();
$roles = ( array ) $user->roles;
}
//get all categories for the post
$categories = wp_get_object_terms($ID, ‘category’);//if there is more than one category set, check to see if one of them is the default
if ($categories[0]->name == “Uncategorized”) {
foreach ($categories as $key => $category) {
//if category is the default, then remove it
if ($category->name == “Uncategorized”) {
wp_remove_object_terms($ID, ‘uncategorized’, ‘category’);
wp_set_object_terms( $ID, “fitness-health”, ‘category’);
}
}
}
}
//hook in to the publsh_post action to run when a post is published
add_action(‘publish_post’, ‘remove_default_category’, 10, 2);Above is just an example…
Same way I want to add category to event while user create new event via code- This reply was modified 4 years, 4 months ago by ashishodich.
Hello,
Same issues for all social platform
Hello Pete,
Yes, you can display both users in front-end post meta.
Forum: Plugins
In reply to: [WP SimplePost Contributors] What method do you determine a “contributor”Hello Pete,
It is just users’ list defined by admin. To select more contributors, admin can get users’ list to select as a contributor. It used to display more authors for post, who has contributed in post.It is just display contributors at front-side only, Contributors can not be able to modify post only post admin can able to modify post.
For contributors, To modify post feature I will release in next version.