opts = array( 'before' => ' ', 'after' => ' ', 'delimiter' => ' / ' ); $markup = $this->opts['before'] . $this->opts['delimiter'] . $this->opts['after']; global $post, $options; echo '

' . __('Home', 'avis-lite') . ''; if (!is_front_page()) { echo $markup; } if (!is_front_page() && is_home()) { echo esc_attr( get_theme_mod('avis_blogpage_heading', __('Blog', 'avis-lite') ) ); } if (is_front_page() && !is_home()) { echo $markup; } $output = $this->avis_lite_simple_breadcrumb_case($post); if (is_page() || is_single()) { the_title('', ''); } else { echo $output; } echo "

"; } function avis_lite_simple_breadcrumb_case($der_post) { $markup = $this->opts['before'] . $this->opts['delimiter'] . $this->opts['after']; if (is_page()) { if ($der_post->post_parent) { $my_query = get_post($der_post->post_parent); $this->avis_lite_simple_breadcrumb_case($my_query); $link = ''; $link .= '' . esc_attr( get_the_title($my_query->ID) ) . '' . $markup; echo $link; } return; } if (is_single() && !is_attachment()) { $category = get_the_category(); if (is_attachment()) { $my_query = get_post($der_post->post_parent); $category = get_the_category($my_query->ID); $ID = $category[0]->cat_ID; echo get_category_parents($ID, true, $markup, false); previous_post_link("%link $markup"); } else { if (isset($category[0]->cat_ID)) { $ID = $category[0]->cat_ID; echo get_category_parents($ID, true, $markup, false); } } return; } if (is_category()) { $category = get_the_category(); $i = $category[0]->cat_ID; $parent = $category[0]->category_parent; if ($parent > 0 && $category[0]->cat_name == single_cat_title('', false)) { echo get_category_parents($parent, true, $markup, false); } return single_cat_title('', false); } if (is_author()) { #$curauth = get_userdatabylogin(get_query_var('author_name')); global $wp_query; $curauth = $wp_query->get_queried_object(); return __('Author', 'avis-lite') . ' : ' . $curauth->display_name; } if (is_tag()) { return __('Tag', 'avis-lite') . ' : ' . single_tag_title('', false); } if (is_search()) { return __('Search', 'avis-lite'); } if (is_404()) { return __('Error 404', 'avis-lite'); } if (is_year()) { return get_the_time('Y'); } if (is_month()) { $k_year = get_the_time('Y'); echo "" . $k_year . "" . $markup; return get_the_time('F'); } if (is_day() || is_time()) { $k_year = get_the_time('Y'); $k_month = get_the_time('m'); $k_month_display = get_the_time('F'); echo "" . $k_year . "" . $markup; echo "" . $k_month_display . "" . $markup; return get_the_time('jS (l)'); } } } $avis_lite_breadcumb = new avis_lite_breadcrumb_class(); ?>