Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thank you very much for the hints, really interesting.

    One more question, is there any easy code snippet for displaying data such as: team A name, team B name, event name, countdown and basically all the rest of “single” elements which are used within the shortcodes?

    Currently I’m using for example:

    $leagues = get_the_terms( $post->ID, 'sp_league' );
    		if ( $leagues ):
    			foreach( $leagues as $league ):
    				$term = get_term( $league->term_id, 'sp_league' );
    				?>
    				<h5 class="event-league">event: <?php echo $term->name; ?></h5>
    				<?php
    			endforeach;
    		endif;

    for displaying the league name and

    $leagues = get_the_terms( $post->ID, 'sp_league' );
    		if ( $leagues ):
    			foreach( $leagues as $league ):
    				$term = get_term( $league->term_id, 'sp_league' );
    				?>
    				<h5 class="event-league">teams: <?php echo $term->name; ?></h5>
    				<?php
    			endforeach;
    		endif;

    + some data scraping for displaying “single” team names (in order to display just “TEAM A” instead of “TEAM A vs TEAM B”), since I want to link them to their corresponding team page.

    Is there any better way for retrieve this kind of data within the template page?

    thank you again.

    I was wondering the same.

    Is “content-single-event.php” the .php template used for events? I tried to edit it, but it doesn’t seems to affect the Event pages at all.

Viewing 2 replies - 1 through 2 (of 2 total)