<h2 class="tribe-events-page-title"><?php tribe_events_title(); ?> </h2> <?php $title_content = ob_get_clean(); /*******************************************************************/ ?> <?php do_action('tribe_events_before_header'); /*******************************************************************/ $registered_views = tribe_events_get_views(); foreach ($registered_views as $view) { $current_view = $view["displaying"]; if (tribe_is_view($current_view)) { $selected_view = $current_view; } } $selected_view = isset($selected_view) ? $selected_view : "month"; $selected_view = $selected_view == "upcoming" ? "list" : $selected_view; /*******************************************************************/ ?> <div id="tribe-events-header" <?php tribe_events_the_header_attributes(); ?> > <?php do_action('tribe_events_before_the_title'); ?> <?php
<div id="tribe-bar-views"> <div class="tribe-bar-views-inner tribe-clearfix"> <h3 class="tribe-events-visuallyhidden"><?php esc_html_e('Event Views Navigation', 'the-events-calendar'); ?> </h3> <label><?php esc_html_e('View As', 'the-events-calendar'); ?> </label> <select class="tribe-bar-views-select tribe-no-param" name="tribe-bar-view"> <?php foreach ($views as $view) { ?> <option <?php echo tribe_is_view($view['displaying']) ? 'selected' : 'tribe-inactive'; ?> value="<?php echo esc_attr($view['url']); ?> " data-view="<?php echo esc_attr($view['displaying']); ?> "> <?php echo $view['anchor']; ?> </option> <?php } ?>
/** * Helper function checks if we are currently on an events page/post/archive * * @since 2.0.0 * @access public */ public static function is_tribe_events() { if (is_search()) { return false; } if (tribe_is_event() || tribe_is_event_category() || tribe_is_in_main_loop() || tribe_is_view() || is_singular('tribe_events')) { return true; } }
<!--<div class="side_foot"></div>--> <div class="mobile_sub">Sub Menu<i class='fa fa-chevron-down'></i></div> <div class="side_nav_wrap"> <!--News Pages---> <?php if (is_home() || is_single() && 'tribe_events' != get_post_type() && !is_singular('tribe_events')) { echo do_shortcode('[widget id="recent-posts-2"]'); echo do_shortcode('[widget id="archives-2"]'); } ?> <!---Training Pages and Courses---> <?php if (is_page(16) || $post->post_parent == '16' || tribe_is_event() || tribe_is_event_category() || tribe_is_in_main_loop() || tribe_is_view() || 'tribe_events' == get_post_type() || is_singular('tribe_events')) { ?> <h3 class="ancestor_title"><a href="<?php echo esc_url(home_url('/')); ?> training">Training</a></h3> <?php echo do_shortcode('[widget id="nav_menu-7"]'); } ?> <!---Members Pages---> <!--Get the Grandparent of the page--> <?php $current = $post->ID; $parent = $post->post_parent;
<?php use Roots\Sage\Titles; ?> <div class="page-header"> <?php if (tribe_is_event() || tribe_is_event_category() || tribe_is_in_main_loop() || tribe_is_view() || 'tribe_events' == get_post_type() || is_singular('tribe_events')) { ?> <h1>Training</h1> <?php } else { ?> <h1><?php echo Titles\title(); ?> </h1> <?php } ?> </div>
function the_breadcrumb() { global $post; echo '<div class="silver breadcrumbs">'; echo '<nav class="container">'; echo '<ul>'; if (!is_home()) { echo '<li><a href="'; echo get_option('home'); echo '">'; echo '<i class="fa fa-home"></i>'; echo '</a></li><li> / </li>'; if (is_archive() && !tribe_is_event_category()) { echo '<li><a href="' . get_permalink(get_ID_by_slug('whats-new')) . '">' . get_the_title(get_ID_by_slug('whats-new')) . '</a><li/><li>'; echo '</li><li> / </li><li><strong>' . return_child_cat('whats-new') . ' </strong>'; //echo 'archive'; } elseif (is_single() && !tribe_is_event_category()) { echo '<li><a href="' . get_permalink(get_ID_by_slug('whats-new')) . '">' . get_the_title(get_ID_by_slug('whats-new')) . '</a><li/><li>'; echo '</li><li> / </li><li>'; echo '<li>' . return_child_cat('whats-new', TRUE); echo '</li><li> / </li><li>'; the_title(); echo '</li>'; //echo 'single'; } elseif (is_page()) { //echo 'page'; if ($post->post_parent) { $anc = get_post_ancestors($post->ID); $title = get_the_title(); foreach ($anc as $ancestor) { $output = '<li><a href="' . get_permalink($ancestor) . '" title="' . get_the_title($ancestor) . '">' . get_the_title($ancestor) . '</a></li> <li>/</li>'; } echo $output; echo '<strong title="' . $title . '"> ' . $title . '</strong>'; } else { echo '<li><strong> ' . get_the_title() . '</strong></li>'; } } elseif (tribe_is_event() || tribe_is_event_category() || tribe_is_in_main_loop() || tribe_is_view() || 'tribe_events' == get_post_type() || is_singular('tribe_events')) { echo '<li><strong>Going out</strong></li>'; echo '<li> / </li>'; if (tribe_is_event_category()) { echo '<li><strong>' . tribe_get_event_taxonomy() . '</strong></li>'; } if (is_singular('tribe_events')) { echo '<li> / </li>'; echo '<li><strong>' . get_the_title() . '</strong></li>'; } } elseif (is_search()) { echo '<li>Search Results: ' . the_search_query() . '</li>'; } } elseif (is_tag()) { single_tag_title(); } elseif (is_day()) { echo "<li>Archive for "; the_time('F jS, Y'); echo '</li>'; } elseif (is_month()) { echo "<li>Archive for "; the_time('F, Y'); echo '</li>'; } elseif (is_year()) { echo "<li>Archive for "; the_time('Y'); echo '</li>'; } elseif (is_author()) { echo "<li>Author Archive"; echo '</li>'; } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { echo "<li>Blog Archives"; echo '</li>'; } echo '</ul>'; echo '</nav>'; echo '</div>'; }
<section id="secondary-navigation"> <div class="big-container full-width"> <div class="container"> <ul class="clearfix"> <?php if (is_page('news') || tribe_is_event() || tribe_is_month() && !is_tax() || (tribe_is_past() || tribe_is_upcoming() && !is_tax()) || tribe_is_day() && !is_tax() || tribe_is_event_category() || tribe_is_in_main_loop() || tribe_is_view() || 'tribe_events' == get_post_type() || is_singular('tribe_events')) { ?> <li class="page_item page-item-37"> <a></a> </li> <?php } else { ?> <?php wp_list_pages(array('title_li' => '', 'include' => get_post_top_ancestor_id())); ?> <?php wp_list_pages(array('title_li' => '', 'depth' => 1, 'child_of' => get_post_top_ancestor_id())); ?> <?php } ?> </ul> </div> </div> </section>