I am Looking to limit what events people see depending on there user role and what category the event is part of.
I can do this with normal custom post types by doing the following code:
$roles = appthemes_check_user_role();
if (in_array('training', $roles)){
global $wpdb;
$sql = " AND (ID IN (select object_id from wp_term_relationships where term_taxonomy_id IN (23)) OR ($wpdb->posts.post_author IN (SELECT user_id FROM $wpdb->usermeta WHERE meta_key = 'wp_capabilities' AND meta_value LIKE '%training%')))" . $sql;
}
that is added to word press in the following filter:
I can recommend looking at the FHEE__Events_Admin_Page__get_events__where filter hook found in /event-espresso-core-reg/caffeinated/admin/extend/events/Extend_Events_Admin_Page.core.php.
Viewing 1 reply thread
The support post ‘Admin Event List – Restrict events by catogrys’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.