Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Remove this line
- add_filter( 'parse_tribe_event_query', 'hide_my_private_category', 999 );
- // Replace it with this
- add_action('init', 'whenLoggedOut');
- // And also add this
- function whenLoggedOut() {
- $current_user = wp_get_current_user();
- if ($current_user->ID === 0)
- add_filter('parse_tribe_event_query', 'hide_my_private_category', 999);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement