Created
March 9, 2012 01:39
-
-
Save jo-snips/2004548 to your computer and use it in GitHub Desktop.
The Events Calendar: Use alternate back links on single events based on category
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(has_term( 'zen-meditation', 'tribe_events_cat' )) { | |
echo '<span class="back"><a href="' . tribe_get_events_link() . 'category/zen-meditation">' . __('« Back to Zen Events', 'tribe-events-calendar') . '</a></span>'; | |
} elseif (has_term( 'celebrations', 'tribe_events_cat' )) { | |
echo '<span class="back"><a href="' . tribe_get_events_link() . 'category/celebrations">' . __('« Back to Celebrations', 'tribe-events-calendar') . '</a></span>'; | |
} else { | |
echo '<span class="back"><a href="' . tribe_get_events_link() . '">' . __('« Back to Events', 'tribe-events-calendar') . '</a></span>'; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment