Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
The Events Calendar: Conditional Page Titles
<div id="pageHead">
<?php if( tribe_is_month() && !is_tax() ) { // The Main Calendar Page ?>
<h1 class="home">The Main Calendar</h1>
<?php } elseif( tribe_is_month() && is_tax() ) { // Calendar Category Pages ?>
<h1 class="home">Calendar Category: <?php echo tribe_meta_event_category_name(); ?></h1>
<?php } elseif( tribe_is_event() && !tribe_is_day() && !is_single() && !is_tax() ) { // The Main Events List ?>
<h1 class="home">Events List</h1>
<?php } elseif( tribe_is_event() && !tribe_is_day() && !is_single() && is_tax() ) { // Category Events List ?>
<h1 class="home">Events List: <?php echo tribe_meta_event_category_name(); ?></h1>
<?php } elseif( tribe_is_event() && is_single() ) { // Single Events ?>
<h1><?php the_title(); ?></h1>
<?php } elseif( tribe_is_day() ) { // Single Event Days ?>
<h1><?php $title = 'Events on: ' . date('F j, Y', strtotime(get_query_var( 'eventDate' ))); ?></h1>
<?php } elseif( tribe_is_venue() ) { // Single Venues ?>
<h1><?php the_title(); ?></h1>
<?php } else { ?>
<h1><?php the_title(); ?></h1>
<?php } ?>
<?php $page_description = get_post_meta($post->ID, "_ttrust_page_description_value", true); ?>
<?php if ($page_description) : ?>
<p><?php echo $page_description; ?></p>
<?php endif; ?>
</div><!--end pageHead -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.