'; if ( !is_home() ) { echo '
  • '; echo esc_html__( 'Home', 'bajaar' ); echo "
  • " . esc_attr( $seperator ); if ( is_category() || is_single() ) { echo '
  • '; $category = get_the_category(); $post = get_queried_object(); $postType = get_post_type_object( get_post_type( $post ) ); if ( !empty( $category ) ) { echo esc_html( $category[ 0 ]->cat_name ) . '
  • '; } else if ( $postType ) { if(is_singular('xs-speaker') ){ echo ''. esc_html( $postType->labels->singular_name ) . ''; }else{ echo esc_html( $postType->labels->singular_name ) . ''; } } if ( is_single() ) { echo esc_attr( $seperator ) . "
  • "; echo esc_html( $word ) != '' ? wp_trim_words( get_the_title(), $word ) : get_the_title(); echo '
  • '; } } elseif ( is_page() ) { echo '
  • '; echo esc_html( $word ) != '' ? wp_trim_words( get_the_title(), $word ) : get_the_title(); echo '
  • '; } } if(is_shop()){ echo"
  • " . esc_html__( 'Shop', 'bajaar' ) . "
  • "; } if ( is_tag() ) { single_tag_title(); } elseif ( is_day() ) { echo"
  • " . esc_html__( 'Blogs for', 'bajaar' ) . " "; the_time( 'F jS, Y' ); echo'
  • '; } elseif ( is_month() ) { echo"
  • " . esc_html__( 'Blogs for', 'bajaar' ) . " "; the_time( 'F, Y' ); echo'
  • '; } elseif ( is_post_type_archive('xs-speaker') ) { $postType = get_post_type_object(get_post_type()); echo"
  • " . esc_html($postType->labels->name); echo'
  • '; } elseif ( is_year() ) { echo"
  • " . esc_html__( 'Blogs for', 'bajaar' ) . " "; the_time( 'Y' ); echo'
  • '; } elseif ( is_author() ) { echo"
  • " . esc_html__( 'Author Blogs', 'bajaar' ); echo'
  • '; } elseif ( isset( $_GET[ 'paged' ] ) && !empty( $_GET[ 'paged' ] ) ) { echo "
  • " . esc_html__( 'Blogs', 'bajaar' ); echo'
  • '; } elseif ( is_search() ) { echo"
  • " . esc_html__( 'Search Result', 'bajaar' ); echo'
  • '; } elseif ( is_404() ) { echo"
  • " . esc_html__( '404 Not Found', 'bajaar' ); echo'
  • '; } echo ''; endif; } } // display meta information for a specific post // ---------------------------------------------------------------------------------------- function bajaar_post_meta() { ?>
    %3$s', get_avatar( get_the_author_meta( 'ID' ), 55 ), esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), get_the_author() ); endif; if ( get_post_type() === 'post' && $blog_date_show =='yes') { echo ' '. get_the_date() . ''; } $category_list = get_the_category_list( ', ' ); if ( $category_list && $blog_category_show =='yes') { echo ' '. $category_list .' '; } if(is_single()): ?> 1 ? esc_html__( ' Comments ', 'bajaar' ) : esc_html__( ' Comment ', 'bajaar' ) ; ?>
    %3$s', get_avatar( get_the_author_meta( 'ID' ), 55 ), esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), get_the_author() ); endif; if ( get_post_type() === 'post' && $blog_date_show =='yes') { echo ' '. get_the_date() . ''; } $category_list = get_the_category_list( ', ' ); if ( $category_list && $blog_category_show =='yes') { echo ' '. $category_list .' '; } if(is_single() && $blog_details_Comments_show == 'yes'): ?> 1 ? esc_html__( ' Comments ', 'bajaar' ) : esc_html__( ' Comment ', 'bajaar' ) ; ?>
    '. get_the_date( 'm F Y' ) .''; } } // comment walker // ---------------------------------------------------------------------------------------- function bajaar_comment_style( $comment, $args, $depth ) { if ( 'div' === $args[ 'style' ] ) { $tag = 'div'; $add_below = 'comment'; } else { $tag = 'li '; $add_below = 'div-comment'; } ?> 'comment-avatar pull-left' ) ); } ?> < id="comment-">
    %s %s', 'bajaar' ), get_comment_author_link(), esc_html__( 'says:', 'bajaar' ) ); ?> comment_approved == '0' ) { ?>
    $add_below, 'depth' => $depth, 'max_depth' => $args[ 'max_depth' ] ) ) ); ?>
    '', 'link_before' => '', 'link_after' => '', 'next_or_number' => 'number', 'separator' => ' ', 'nextpagelink' => esc_html__( 'Next ', 'bajaar' ) . '', 'previouspagelink' => '' . esc_html__( ' Previous', 'bajaar' ), ); wp_link_pages( $args ); } // related post by categry function bajaar_related_posts_by_category( $bajaar_post_id, $related_count=4, $feature_image = true ) { try{ if($bajaar_post_id==''){ $bajaar_post_id = get_the_ID(); } $terms = get_the_terms( $bajaar_post_id, 'category' ); if ( empty( $terms ) ) $terms = array(); $term_list = wp_list_pluck( $terms, 'slug' ); $related_args = array( 'post_type' => 'post', 'posts_per_page' => $related_count, 'post_status' => 'publish', 'post__not_in' => array( $bajaar_post_id ), 'orderby' => 'rand', 'ignore_sticky_posts'=>1, 'tax_query' => array( array( 'taxonomy' => 'category', 'field' => 'slug', 'terms' => $term_list ) ) ); if($feature_image){ $related_args["meta_query"] = array( array( 'key' => '_thumbnail_id', 'compare' => 'EXISTS' ), ); } return new WP_Query( $related_args ); } catch(Exception $e) { return new WP_Query( [] ); } // wp_reset_postdata() already used in post query } // related post by tags function bajaar_related_posts_by_tags( $bajaar_post_id = '', $related_count=4, $feature_image = true ) { try{ if($bajaar_post_id==''){ $bajaar_post_id = get_the_ID(); } $tags = wp_get_post_tags($bajaar_post_id); $term_tags = wp_list_pluck($tags,'term_id'); $args = array( 'tag__in' => $term_tags, 'post__not_in' => array($bajaar_post_id), 'posts_per_page'=>$related_count, 'ignore_sticky_posts'=>1, ); if($feature_image){ $args["meta_query"] = array( array( 'key' => '_thumbnail_id', 'compare' => 'EXISTS' ), ); } return new WP_Query($args); } catch(Exception $e) { return new WP_Query( [] ); } // wp_reset_postdata() already used in post query } /* * * Tag list **/ function bajaar_tag_list(){ $tag_list = get_the_tag_list( '', ' ' ); if ( $tag_list ) { echo '
    '; echo '
    '; echo '' . esc_html__( 'Tags: ', 'bajaar' ) . ''; echo bajaar_kses( $tag_list ); echo '
    '; echo '
    '; } } /* * * product category **/ function bajaar_product_category($cat){ if(!class_exists('woocommerce')){ return []; } $tax_terms = get_terms($cat, array('hide_empty' => false)); $category_list = []; foreach($tax_terms as $term_single) { $category_list[$term_single->term_id] = [$term_single->name]; } return $category_list; }