Support » Plugin: The Events Calendar » [Plugin: The Events Calendar] Display Category of Event

  • Resolved ConTici

    (@contici)


    How the dickens do I get the category of an event to display?

    I’ve tried editing the table.php. See the code below… Thanks. 🙂

    function display_day( $day, $monthView ) {
    	global $post;
    	$output = '';
    	$posts_per_page = tribe_get_option( 'postsPerPage', 10 );
    	for ( $i = 0; $i < count( $monthView[$day] ); $i++ ) {
    		$post = $monthView[$day][$i];
    		setup_postdata( $post );
    		$eventId	= $post->ID.'-'.$day;
    		$start		= tribe_get_start_date( $post->ID, false, 'U' );
    		$end		= tribe_get_end_date( $post->ID, false, 'U' );
    		$cost		= tribe_get_cost( $post->ID );
    		$category	= tribe_meta_event_category_name( $post->ID );
    		?>
    		<div id='event_<?php echo $eventId; ?>' <?php post_class('tribe-events-event tribe-events-real-event') ?>>
    			<a href="<?php tribe_event_link(); ?>"><?php the_title(); ?></a><?php echo 'cat' . $category;  ?>

    http://wordpress.org/extend/plugins/the-events-calendar/

    [ Please do not bump your support thread. It will be deleted. ]

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: The Events Calendar] Display Category of Event’ is closed to new replies.