'.esc_html__('Home', 'forgood').''; $showCurrent = 1; global $post; $homeLink = esc_url(home_url()); if ( is_front_page() ) { return; } // don't display breadcrumbs on the homepage (yet) echo wp_kses('
  • Home
  • ', 'forgood'); if ( is_category() ) { // category section $thisCat = get_category(get_query_var('cat'), false); if (!empty($thisCat->parent)) echo get_category_parents($thisCat->parent, TRUE, ' ' . '/' . ' '); echo '
  • '. esc_html__('Archive for category', 'forgood').' "' . single_cat_title('', false) . '"' . '
  • '; } elseif ( is_search() ) { // search section echo '
  • ' . esc_html__('Search results for', 'forgood').' "' . get_search_query() . '"' .'
  • '; } elseif ( is_day() ) { echo '
  • ' . get_the_time('Y') . '
  • '; echo '
  • ' . get_the_time('F') . '
  • '; echo '
  • ' . get_the_time('d') .'
  • '; } elseif ( is_month() ) { // monthly archive echo '
  • ' . get_the_time('Y') . '
  • '; echo '
  • ' . get_the_time('F') .'
  • '; } elseif ( is_year() ) { // yearly archive echo '
  • '. get_the_time('Y') .'
  • '; } elseif ( is_single() && !is_attachment() ) { // single post or page if ( get_post_type() != 'post' ) { $post_type = get_post_type_object(get_post_type()); $slug = $post_type->rewrite; echo '
  • ' . $post_type->labels->singular_name . '
  • '; if ($showCurrent) echo '
  • '. get_the_title() .'
  • '; } else { $cat = get_the_category(); if (isset($cat[0])) {$cat = $cat[0];} else {$cat = false;} if ($cat) {$cats = get_category_parents($cat, TRUE, ' ' .' ' . ' ');} else {$cats=false;} if (!$showCurrent && $cats) $cats = preg_replace("#^(.+)\s\s$#", "$1", $cats); echo '
  • ' .$cats.'
  • '; if ($showCurrent) echo '
  • ' . get_the_title() .'
  • '; } } elseif ( !is_single() && !is_page() && get_post_type() != 'post' && !is_404() ) { // some other single item $post_type = get_post_type_object(get_post_type()); echo '
  • ' . $post_type->labels->singular_name .'
  • '; } elseif ( is_attachment() ) { // attachment section $parent = get_post($post->post_parent); $cat = get_the_category($parent->ID); if (isset($cat[0])) {$cat = $cat[0];} else {$cat=false;} if ($cat) echo get_category_parents($cat, TRUE, ' ' . ' ' . ' '); echo '
  • ' . $parent->post_title . '
  • '; if ($showCurrent) echo '
  • ' . get_the_title() . '
  • '; } elseif ( is_page() && !$post->post_parent ) { if ($showCurrent) echo '
  • ' . get_the_title() . '
  • '; } elseif ( is_page() && $post->post_parent ) { // child page $parent_id = $post->post_parent; $breadcrumbs = array(); while ($parent_id) { $page = get_page($parent_id); $breadcrumbs[] = '
  • ' . get_the_title($page->ID) . '
  • '; $parent_id = $page->post_parent; } $breadcrumbs = array_reverse($breadcrumbs); for ($i = 0; $i < count($breadcrumbs); $i++) { print wp_kses_post($breadcrumbs[$i], 'forgood'); if ($i != count($breadcrumbs)-1); } if ($showCurrent) echo '
  • ' . get_the_title() . '
  • '; } elseif ( is_tag() ) { // tags archive echo '
  • ' . esc_html__('Posts tagged', 'forgood').' "' . single_tag_title('', false) . '"' . '
  • '; } elseif ( is_author() ) { // author archive global $author; $userdata = get_userdata($author); echo '
  • ' . esc_html__('Articles posted by', 'forgood'). ' ' . $userdata->display_name . '
  • '; } elseif ( is_404() ) { // 404 echo '
  • ' . esc_html__('Not Found', 'forgood') .'
  • '; }elseif( (function_exists( 'is_cart' ) && is_cart() ) || (function_exists( 'is_checkout' ) && is_checkout()) ) { if( $page_id = get_option( 'woocommerce_shop_page_id' ) ) $items[] = sprintf( $item_tpl, esc_url(get_permalink( $page_id )), get_the_title( $page_id ) ); } if ( get_query_var('paged') ) { if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo '
  • ('; echo '
  • '.esc_html__('Page', 'forgood') . ' ' . get_query_var('paged').'
  • '; if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ')'; } } endif; /*------------------------------------------------ forgood Comment List -------------------------------------------------*/ if(!function_exists('forgood_comment_list')){ function forgood_comment_list($comment, $args, $depth){ $GLOBALS['comment'] = $comment; extract($args, EXTR_SKIP); $avatar = get_avatar( $comment,70,null,null,array('class'=>array('media-object'))); ?>
  • $depth, 'max_depth' => $args['max_depth'],'reply_text'=> '' . esc_html__('Reply', 'forgood') ) ) ); ?>