} else { ?> <div class="mdl-grid"> <div class="mdl-cell mdl-cell--12-col"> <h1 class="page-title"><?php if (is_home()) { $p = get_post(get_option('page_for_posts')); if ($p) { echo get_the_title($p); } } elseif (is_category() || is_tax()) { single_cat_title(); } elseif (is_post_type_archive('org')) { echo tst_get_post_type_archive_title('org'); } elseif (is_post_type_archive('project')) { echo tst_get_post_type_archive_title('project'); } ?> </h1> <?php if (tst_has_authors() && is_tax('auctor') || is_category() || is_tax('org_cat') || is_tax('person_cat')) { $qo = get_queried_object(); echo "<div class='author-description'>"; //print event empty - we need it for layout if (isset($qo->description)) { echo apply_filters('tst_the_title', $qo->description); } echo "</div>"; } ?> </div>
/** Breadcrumbs **/ function tst_breadcrumbs() { global $post; $links = array(); if (is_front_page()) { $links[] = "<span class='crumb-name'>" . get_bloginfo('name') . "</span>"; } elseif (is_singular('post')) { $cat = get_the_terms($post->ID, 'category'); if (!empty($cat)) { $links[] = "<a href='" . get_term_link($cat[0]) . "' class='crumb-link'>" . apply_filters('tst_the_title', $cat[0]->name) . "</a>"; } } elseif (is_singular('event')) { $p = get_page_by_path('calendar'); $links[] = "<a href='" . get_permalink($p) . "' class='crumb-link'>" . get_the_title($p) . "</a>"; } elseif (is_page() || is_singular('leyka_campaign')) { //@to-do - if treee ? $links[] = "<span class='crumb-name'>" . get_the_title($post) . "</span>"; } elseif (is_home()) { $p = get_post(get_option('page_for_posts')); if ($p) { $links[] = "<span class='crumb-name'>" . get_the_title($p) . "</span>"; } } elseif (is_category()) { $links[] = "<span class='crumb-name'>" . single_cat_title('', false) . "</span>"; } elseif (is_post_type_archive('project')) { $links[] = "<span class='crumb-name'>" . tst_get_post_type_archive_title('project') . "</span>"; } elseif (is_post_type_archive('org')) { $links[] = "<span class='crumb-name'>" . tst_get_post_type_archive_title('org') . "</span>"; } elseif (is_singular('project')) { $links[] = "<a href='" . get_post_type_archive_link('project') . "' class='crumb-link'>" . tst_get_post_type_archive_title('project') . "</a>"; } $sep = ''; return "<div class='crumbs'>" . implode($sep, $links) . "</div>"; }