natver
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Forum: Plugins
In reply to: [The Events Calendar] ACF field from categoryClosing
Forum: Plugins
In reply to: [The Events Calendar] ACF field from categoryI figured this out. I added a function in functions.php and then called it inside the template
if ( class_exists('Tribe__Events__Main') ){ function tribe_get_color_categories ( $event_id = null ) { if ( is_null( $event_id ) ) { $event_id = get_the_ID(); } $event_cats = ''; $term_list = wp_get_post_terms( $event_id, Tribe__Events__Main::TAXONOMY ); foreach( $term_list as $term_single ) { $category_color_primary = get_field('event_category_color', $term_single); } if($category_colour_primary) { echo 'style="color:'; echo $category_color_primary; echo ' " '; } } }As I understand the code says that trashed events shouldn’t be visible on front as the em-event.php shows:
$result = wp_trash_post($this->post_id);
if( !$result && $this->post_status == ‘trash’ ){$this->set_status(-1);
$result = false;
}
but they are still in my feed (if they were future events only)- This reply was modified 9 years, 8 months ago by natver.
Viewing 3 replies - 1 through 3 (of 3 total)