', $after = '') { if (is_archive()) { if (is_category()) { $title = sprintf(__('Category Archives: %s', 'e-comme'), '' . single_cat_title('', false) . ''); } elseif (is_tag()) { $title = sprintf(__('Tag Archives: %s', 'e-comme'), '' . single_tag_title('', false) . ''); } elseif (is_author()) { $title = sprintf(__('Author Archives: %s', 'e-comme'), '' . get_the_author() . ''); } elseif (is_year()) { $title = sprintf(__('Yearly Archives: %s', 'e-comme'), get_the_date(_x('Y', 'yearly archives date format', 'e-comme'))); } elseif (is_month()) { $title = sprintf(__('Monthly Archives: %s', 'e-comme'), get_the_date(_x('F Y', 'monthly archives date format', 'e-comme'))); } elseif (is_day()) { $title = sprintf(__('Daily Archives: %s', 'e-comme'), get_the_date(_x('F j, Y', 'daily archives date format', 'e-comme'))); } elseif (is_post_type_archive()) { $title = sprintf(__('Archives: %s', 'e-comme'), post_type_archive_title('', false)); } } elseif (is_search()) { $title = sprintf(__('Search Results for : %s', 'e-comme'), get_search_query()); } elseif (is_404()) { $title = sprintf(__('Error 404 : Page Not Found', 'e-comme')); } elseif (is_home() || is_front_page()) { $title = sprintf(' '.__('Home', 'e-comme')); } else { echo $before . get_the_title() . $after; } if (!empty($title)) { echo $before . $title . $after; } } function e_comme_breadcrumbs() { /* === OPTIONS === */ $text['home'] = __('Home', 'e-comme'); // text for the 'Home' link $text['category'] = __('Archive by Category "%s"', 'e-comme'); // text for a category page $text['tax'] = __('Archive for "%s"', 'e-comme'); // text for a taxonomy page $text['search'] = __('Search Results for "%s" Query', 'e-comme'); // text for a search results page $text['tag'] = __('Posts Tagged "%s"', 'e-comme'); // text for a tag page $text['author'] = __('Articles Posted by %s', 'e-comme'); // text for an author page $text['404'] = __('Error 404', 'e-comme'); // text for the 404 page $showCurrent = 1; // 1 - show current post/page title in breadcrumbs, 0 - don't show $showOnHome = 0; // 1 - show breadcrumbs on the homepage, 0 - don't show $delimiter = ''; // delimiter between crumbs $before = '
  • '; // tag before the current crumb $after = '
  • '; // tag after the current crumb /* === END OF OPTIONS === */ global $post; $homeLink = esc_url(home_url('/')); $linkBefore = '
  • '; $linkAfter = '
  • '; $linkAttr = ' rel="v:url" property="v:title"'; $link = $linkBefore . '%2$s' . $linkAfter; if (is_home() || is_front_page()) { if ($showOnHome == 1) { echo ''; } } else { echo ''; } } // end e_comme_breadcrumbs() ?>