%4$s'; $on = __( 'Updated on ', 'blossom-studio' ); }else{ $time_string = ''; } }else{ $time_string = ''; } $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) ); $posted_on = sprintf( '%1$s %2$s', esc_html( $on ), '' . $time_string . '' ); echo '' . $posted_on . ''; // WPCS: XSS OK. } endif; if ( ! function_exists( 'blossom_studio_posted_by' ) ) : /** * Prints HTML with meta information for the current author. */ function blossom_studio_posted_by() { $ed_post_author = get_theme_mod( 'ed_post_author', false ); if( $ed_post_author ) return false; $byline = sprintf( '%1$s %2$s %3$s %4$s %5$s %6$s', '' ); if( is_home() ) : echo ''; else: echo ''; endif; } endif; if( ! function_exists( 'blossom_studio_comment_count' ) ) : /** * Comment Count */ function blossom_studio_comment_count(){ if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) { echo ''; comments_popup_link( sprintf( wp_kses( /* translators: %s: post title */ __( 'Leave a Comment on %s', 'blossom-studio' ), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ) ); echo ''; } } endif; if ( ! function_exists( 'blossom_studio_category' ) ) : /** * Prints categories */ function blossom_studio_category(){ $ed_cat_single = get_theme_mod( 'ed_category', false ); // Hide category and tag text for pages. if ( 'post' === get_post_type() && !$ed_cat_single ) { $categories_list = get_the_category_list( ' ' ); if ( $categories_list ) { echo '' . $categories_list . ''; } } } endif; if ( ! function_exists( 'blossom_studio_tag' ) ) : /** * Prints tags */ function blossom_studio_tag(){ // Hide category and tag text for pages. if ( 'post' === get_post_type() ) { $tags_list = get_the_tag_list( '', ' ' ); if ( $tags_list ) { /* translators: 1: list of tags. */ printf( '
' . esc_html__( '%1$sTags:%2$s %3$s', 'blossom-studio' ) . '
', '', '', $tags_list ); } } } endif; if( ! function_exists( 'blossom_studio_get_posts_list' ) ) : /** * Returns Latest, Related & Popular Posts */ function blossom_studio_get_posts_list( $status ){ global $post; $blog = get_option( 'page_for_posts' ); $args = array( 'post_type' => 'post', 'posts_status' => 'publish', 'ignore_sticky_posts' => true ); switch( $status ){ case 'latest': $args['posts_per_page'] = 6; $title = __( 'Latest Posts', 'blossom-studio' ); $class = 'additional-post'; $image_size = 'blossom-studio-blog-grid'; break; case 'related': $args['posts_per_page'] = 2; $args['post__not_in'] = array( $post->ID ); $args['orderby'] = 'rand'; $title = get_theme_mod( 'related_post_title', __( 'You May Also Like', 'blossom-studio' ) ); $class = 'additional-post'; $image_size = 'blossom-studio-blog-grid'; $cats = get_the_category( $post->ID ); if( $cats ){ $c = array(); foreach( $cats as $cat ){ $c[] = $cat->term_id; } $args['category__in'] = $c; } break; } $qry = new WP_Query( $args ); if( $qry->have_posts() ){ ?>
' . esc_html( $title ) . ''; ?>
have_posts() ){ $qry->the_post(); ?>
'; the_title( '

', '

' ); ?>
'; if( is_front_page() && ! $mobile ){ ?>

'; endif; ?>
' . esc_html( $phone ) . ''; if( !empty( $email ) ) echo '
' . sanitize_email( $email ) . '
'; endif; } endif; if( ! function_exists( 'blossom_studio_contact_button' ) ) : /** * Header Contact */ function blossom_studio_contact_button(){ $header_contact_button = get_theme_mod( 'header_contact_button' ); $header_contact_url = get_theme_mod( 'header_contact_url' ); if( $header_contact_button && $header_contact_url ) : ?>
'; echo '
  • ' . esc_html__( 'Click here to add a menu', 'blossom-studio' ) . '
  • '; echo ''; } } endif; if( ! function_exists( 'blossom_studio_secondary_navigation' ) ) : /** * Secondary Navigation */ function blossom_studio_secondary_navigation( $s_id = true ){ ?> '; echo '
  • ' . esc_html__( 'Click here to add a menu', 'blossom-studio' ) . '
  • '; echo ''; } } endif; if( ! function_exists( 'blossom_studio_footer_navigation' ) ) : /** * Footer Navigation */ function blossom_studio_footer_navigation(){ ?> '; echo '
  • ' . esc_html__( 'Click here to add a menu', 'blossom-studio' ) . '
  • '; echo ''; } } endif; if( ! function_exists( 'blossom_studio_mobile_header' ) ) : /** * Fallback for footer menu */ function blossom_studio_mobile_header(){ $ed_search = get_theme_mod( 'ed_header_search', false ); $ed_cart = get_theme_mod( 'ed_shopping_cart', false ); ?>
    '; get_search_form(); echo '
    '; } ?>
    '; $before = ''; // tag before the current crumb $after = ''; // tag after the current crumb if( get_theme_mod( 'ed_breadcrumb', true ) ){ $depth = 1; echo '
    ' . esc_html( $home ) . '' . $delimiter . ''; if( is_home() ){ $depth = 2; echo $before . '' . esc_html( single_post_title( '', false ) ) . '' . $after; }elseif( is_category() ){ $depth = 2; $thisCat = get_category( get_query_var( 'cat' ), false ); if( $show_front === 'page' && $post_page ){ //If static blog post page is set $p = get_post( $post_page ); echo '' . esc_html( $p->post_title ) . '' . $delimiter . ''; $depth++; } if( $thisCat->parent != 0 ){ $parent_categories = get_category_parents( $thisCat->parent, false, ',' ); $parent_categories = explode( ',', $parent_categories ); foreach( $parent_categories as $parent_term ){ $parent_obj = get_term_by( 'name', $parent_term, 'category' ); if( is_object( $parent_obj ) ){ $term_url = get_term_link( $parent_obj->term_id ); $term_name = $parent_obj->name; echo '' . esc_html( $term_name ) . '' . $delimiter . ''; $depth++; } } } echo $before . '' . esc_html( single_cat_title( '', false ) ) . '' . $after; }elseif( blossom_studio_is_woocommerce_activated() && ( is_product_category() || is_product_tag() ) ){ //For Woocommerce archive page $depth = 2; $current_term = $GLOBALS['wp_query']->get_queried_object(); if( wc_get_page_id( 'shop' ) ){ //Displaying Shop link in woocommerce archive page $_name = wc_get_page_id( 'shop' ) ? get_the_title( wc_get_page_id( 'shop' ) ) : ''; if ( ! $_name ) { $product_post_type = get_post_type_object( 'product' ); $_name = $product_post_type->labels->singular_name; } echo '' . esc_html( $_name ) . '' . $delimiter . ''; $depth++; } if( is_product_category() ){ $ancestors = get_ancestors( $current_term->term_id, 'product_cat' ); $ancestors = array_reverse( $ancestors ); foreach ( $ancestors as $ancestor ) { $ancestor = get_term( $ancestor, 'product_cat' ); if ( ! is_wp_error( $ancestor ) && $ancestor ) { echo '' . esc_html( $ancestor->name ) . '' . $delimiter . ''; $depth++; } } } echo $before . '' . esc_html( $current_term->name ) .'' . $after; }elseif( blossom_studio_is_woocommerce_activated() && is_shop() ){ //Shop Archive page $depth = 2; if( get_option( 'page_on_front' ) == wc_get_page_id( 'shop' ) ){ return; } $_name = wc_get_page_id( 'shop' ) ? get_the_title( wc_get_page_id( 'shop' ) ) : ''; $shop_url = ( wc_get_page_id( 'shop' ) && wc_get_page_id( 'shop' ) > 0 ) ? get_the_permalink( wc_get_page_id( 'shop' ) ) : home_url( '/shop' ); if( ! $_name ){ $product_post_type = get_post_type_object( 'product' ); $_name = $product_post_type->labels->singular_name; } echo $before . '' . esc_html( $_name ) . '' . $after; }elseif( is_tag() ){ $depth = 2; $queried_object = get_queried_object(); echo $before . '' . esc_html( single_tag_title( '', false ) ) . ''. $after; }elseif( is_author() ){ global $author; $depth = 2; $userdata = get_userdata( $author ); echo $before . '' . esc_html( $userdata->display_name ) .'' . $after; }elseif( is_search() ){ $depth = 2; $request_uri = $_SERVER['REQUEST_URI']; echo $before . '' . sprintf( __( 'Search Results for "%s"', 'blossom-studio' ), esc_html( get_search_query() ) ) . '' . $after; }elseif( is_day() ){ $depth = 2; echo '' . esc_html( get_the_time( __( 'Y', 'blossom-studio' ) ) ) . '' . $delimiter . ''; $depth++; echo '' . esc_html( get_the_time( __( 'F', 'blossom-studio' ) ) ) . '' . $delimiter . ''; $depth++; echo $before . '' . esc_html( get_the_time( __( 'd', 'blossom-studio' ) ) ) . '' . $after; }elseif( is_month() ){ $depth = 2; echo '' . esc_html( get_the_time( __( 'Y', 'blossom-studio' ) ) ) . '' . $delimiter . ''; $depth++; echo $before . '' . esc_html( get_the_time( __( 'F', 'blossom-studio' ) ) ) . '' . $after; }elseif( is_year() ){ $depth = 2; echo $before .''. esc_html( get_the_time( __( 'Y', 'blossom-studio' ) ) ) .''. $after; }elseif( is_single() && !is_attachment() ){ $depth = 2; if( blossom_studio_is_woocommerce_activated() && 'product' === get_post_type() ){ //For Woocommerce single product if( wc_get_page_id( 'shop' ) ){ //Displaying Shop link in woocommerce archive page $_name = wc_get_page_id( 'shop' ) ? get_the_title( wc_get_page_id( 'shop' ) ) : ''; if ( ! $_name ) { $product_post_type = get_post_type_object( 'product' ); $_name = $product_post_type->labels->singular_name; } echo '' . esc_html( $_name ) . '' . $delimiter . ''; $depth++; } if( $terms = wc_get_product_terms( $post->ID, 'product_cat', array( 'orderby' => 'parent', 'order' => 'DESC' ) ) ){ $main_term = apply_filters( 'woocommerce_breadcrumb_main_term', $terms[0], $terms ); $ancestors = get_ancestors( $main_term->term_id, 'product_cat' ); $ancestors = array_reverse( $ancestors ); foreach ( $ancestors as $ancestor ) { $ancestor = get_term( $ancestor, 'product_cat' ); if ( ! is_wp_error( $ancestor ) && $ancestor ) { echo '' . esc_html( $ancestor->name ) . '' . $delimiter . ''; $depth++; } } echo '' . esc_html( $main_term->name ) . '' . $delimiter . ''; $depth++; } echo $before . '' . esc_html( get_the_title() ) .'' . $after; }elseif( get_post_type() != 'post' ){ $post_type = get_post_type_object( get_post_type() ); if( $post_type->has_archive == true ){// For CPT Archive Link // Add support for a non-standard label of 'archive_title' (special use case). $label = !empty( $post_type->labels->archive_title ) ? $post_type->labels->archive_title : $post_type->labels->name; echo '' . esc_html( $label ) . '' . $delimiter . ''; $depth++; } echo $before . '' . esc_html( get_the_title() ) . '' . $after; }else{ //For Post $cat_object = get_the_category(); $potential_parent = 0; if( $show_front === 'page' && $post_page ){ //If static blog post page is set $p = get_post( $post_page ); echo '' . esc_html( $p->post_title ) . '' . $delimiter . ''; $depth++; } if( $cat_object ){ //Getting category hierarchy if any //Now try to find the deepest term of those that we know of $use_term = key( $cat_object ); foreach( $cat_object as $key => $object ){ //Can't use the next($cat_object) trick since order is unknown if( $object->parent > 0 && ( $potential_parent === 0 || $object->parent === $potential_parent ) ){ $use_term = $key; $potential_parent = $object->term_id; } } $cat = $cat_object[$use_term]; $cats = get_category_parents( $cat, false, ',' ); $cats = explode( ',', $cats ); foreach ( $cats as $cat ) { $cat_obj = get_term_by( 'name', $cat, 'category' ); if( is_object( $cat_obj ) ){ $term_url = get_term_link( $cat_obj->term_id ); $term_name = $cat_obj->name; echo '' . esc_html( $term_name ) . '' . $delimiter . ''; $depth++; } } } echo $before . '' . esc_html( get_the_title() ) . '' . $after; } }elseif( !is_single() && !is_page() && get_post_type() != 'post' && !is_404() ){ //For Custom Post Archive $depth = 2; $post_type = get_post_type_object( get_post_type() ); if( get_query_var('paged') ){ echo '' . esc_html( $post_type->label ) . '' . $delimiter . '/'; echo $before . sprintf( __('Page %s', 'blossom-studio'), get_query_var('paged') ) . $after; //@todo need to check this }else{ echo $before . '' . esc_html( $post_type->label ) . '' . $after; } }elseif( is_attachment() ){ $depth = 2; echo $before . '' . esc_html( get_the_title() ) . '' . $after; }elseif( is_page() && !$post->post_parent ){ $depth = 2; echo $before . '' . esc_html( get_the_title() ) . '' . $after; }elseif( is_page() && $post->post_parent ){ $depth = 2; $parent_id = $post->post_parent; $breadcrumbs = array(); while( $parent_id ){ $current_page = get_post( $parent_id ); $breadcrumbs[] = $current_page->ID; $parent_id = $current_page->post_parent; } $breadcrumbs = array_reverse( $breadcrumbs ); for ( $i = 0; $i < count( $breadcrumbs) ; $i++ ){ echo '' . esc_html( get_the_title( $breadcrumbs[$i] ) ) . '' . $delimiter . ''; $depth++; } echo $before . '' . esc_html( get_the_title() ) . '' . $after; }elseif( is_404() ){ $depth = 2; echo $before . '' . esc_html__( '404 Error - Page Not Found', 'blossom-studio' ) . '' . $after; } if( get_query_var('paged') ) printf( __( ' (Page %s)', 'blossom-studio' ), get_query_var('paged') ); echo '
    '; } } endif; if( ! function_exists( 'blossom_studio_theme_comment' ) ) : /** * Callback function for Comment List * * * @link https://codex.wordpress.org/Function_Reference/wp_list_comments */ function blossom_studio_theme_comment( $comment, $args, $depth ){ if ( 'div' == $args['style'] ) { $tag = 'div'; $add_below = 'comment'; } else { $tag = 'li'; $add_below = 'div-comment'; }?> < id="comment-">
    $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
    ID, '_blossom_studio_sidebar_layout', true ) ){ $sidebar_layout = get_post_meta( $post->ID, '_blossom_studio_sidebar_layout', true ); }else{ $sidebar_layout = 'default-sidebar'; } if( is_page() ){ if( is_active_sidebar( 'sidebar' ) ){ if( $sidebar_layout == 'no-sidebar' || ( $sidebar_layout == 'default-sidebar' && $page_layout == 'no-sidebar' ) ){ $return = $class ? 'full-width' : false; }elseif( $sidebar_layout == 'centered' || ( $sidebar_layout == 'default-sidebar' && $page_layout == 'centered' ) ){ $return = $class ? 'full-width centered' : false; }elseif( ( $sidebar_layout == 'default-sidebar' && $page_layout == 'right-sidebar' ) || ( $sidebar_layout == 'right-sidebar' ) ){ $return = $class ? 'rightsidebar' : 'sidebar'; }elseif( ( $sidebar_layout == 'default-sidebar' && $page_layout == 'left-sidebar' ) || ( $sidebar_layout == 'left-sidebar' ) ){ $return = $class ? 'leftsidebar' : 'sidebar'; } }else{ $return = $class ? 'full-width' : false; } }elseif( is_single() ){ if( is_active_sidebar( 'sidebar' ) ){ if( $sidebar_layout == 'no-sidebar' || ( $sidebar_layout == 'default-sidebar' && $post_layout == 'no-sidebar' ) ){ $return = $class ? 'full-width' : false; }elseif( $sidebar_layout == 'centered' || ( $sidebar_layout == 'default-sidebar' && $post_layout == 'centered' ) ){ $return = $class ? 'full-width centered' : false; }elseif( ( $sidebar_layout == 'default-sidebar' && $post_layout == 'right-sidebar' ) || ( $sidebar_layout == 'right-sidebar' ) ){ $return = $class ? 'rightsidebar' : 'sidebar'; }elseif( ( $sidebar_layout == 'default-sidebar' && $post_layout == 'left-sidebar' ) || ( $sidebar_layout == 'left-sidebar' ) ){ $return = $class ? 'leftsidebar' : 'sidebar'; } }else{ $return = $class ? 'full-width' : false; } } }elseif( blossom_studio_is_woocommerce_activated() && ( is_shop() || is_product_category() || is_product_tag() || get_post_type() == 'product' ) ){ if( $layout == 'no-sidebar' ){ $return = $class ? 'full-width' : false; }elseif( is_active_sidebar( 'shop-sidebar' ) ){ if( $class ){ if( $layout == 'right-sidebar' ) $return = 'rightsidebar'; //With Sidebar if( $layout == 'left-sidebar' ) $return = 'leftsidebar'; } }else{ $return = $class ? 'full-width' : false; } }elseif( is_404() ){ $return = $class ? 'full-width' : false; }else{ if( $layout == 'no-sidebar' ){ $return = $class ? 'full-width' : false; }elseif( is_active_sidebar( 'sidebar' ) ){ if( $class ){ if( $layout == 'right-sidebar' ) $return = 'rightsidebar'; //With Sidebar if( $layout == 'left-sidebar' ) $return = 'leftsidebar'; }else{ $return = 'sidebar'; } }else{ $return = $class ? 'full-width' : false; } } return $return; } endif; if( ! function_exists( 'blossom_studio_get_posts' ) ) : /** * Fuction to list Custom Post Type */ function blossom_studio_get_posts( $post_type = 'post', $slug = false ){ $args = array( 'posts_per_page' => -1, 'post_type' => $post_type, 'post_status' => 'publish', 'suppress_filters' => true ); $posts_array = get_posts( $args ); // Initate an empty array $post_options = array(); $post_options[''] = __( ' -- Choose -- ', 'blossom-studio' ); if ( ! empty( $posts_array ) ) { foreach ( $posts_array as $posts ) { if( $slug ){ $post_options[ $posts->post_title ] = $posts->post_title; }else{ $post_options[ $posts->ID ] = $posts->post_title; } } } return $post_options; wp_reset_postdata(); } endif; if( ! function_exists( 'blossom_studio_get_categories' ) ) : /** * Function to list post categories in customizer options */ function blossom_studio_get_categories( $select = true, $taxonomy = 'category', $slug = false ){ /* Option list of all categories */ $categories = array(); $args = array( 'hide_empty' => false, 'taxonomy' => $taxonomy ); $catlists = get_terms( $args ); if( $select ) $categories[''] = __( 'Choose Category', 'blossom-studio' ); foreach( $catlists as $category ){ if( $slug ){ $categories[$category->slug] = $category->name; }else{ $categories[$category->term_id] = $category->name; } } return $categories; } endif; if( ! function_exists( 'blossom_studio_get_home_sections' ) ) : /** * Returns Home Sections */ function blossom_studio_get_home_sections(){ $sections = array( 'course' => array( 'sidebar' => 'course' ), 'about' => array( 'sidebar' => 'about' ), 'promo' => array( 'sidebar' => 'promo' ), 'testimonial' => array( 'sidebar' => 'testimonial' ), 'cta_wide' => array( 'sidebar' => 'cta-wide' ), 'client' => array( 'sidebar' => 'client' ), 'cta' => array( 'sidebar' => 'cta' ), 'blog' => array( 'section' => 'blog' ), 'shop' => array( 'section' => 'shop' ), ); $enabled_section = array(); foreach( $sections as $k => $v ){ if( array_key_exists( 'sidebar', $v ) ){ if( is_active_sidebar( $v['sidebar'] ) ) array_push( $enabled_section, $v['sidebar'] ); }else{ if( get_theme_mod( 'ed_' . $v['section'] . '_section', true ) ) array_push( $enabled_section, $v['section'] ); } } return apply_filters( 'blossom_studio_home_sections', $enabled_section ); } endif; if( ! function_exists( 'blossom_studio_get_image_sizes' ) ) : /** * Get information about available image sizes */ function blossom_studio_get_image_sizes( $size = '' ) { global $_wp_additional_image_sizes; $sizes = array(); $get_intermediate_image_sizes = get_intermediate_image_sizes(); // Create the full array with sizes and crop info foreach( $get_intermediate_image_sizes as $_size ) { if ( in_array( $_size, array( 'thumbnail', 'medium', 'medium_large', 'large' ) ) ) { $sizes[ $_size ]['width'] = get_option( $_size . '_size_w' ); $sizes[ $_size ]['height'] = get_option( $_size . '_size_h' ); $sizes[ $_size ]['crop'] = (bool) get_option( $_size . '_crop' ); } elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) { $sizes[ $_size ] = array( 'width' => $_wp_additional_image_sizes[ $_size ]['width'], 'height' => $_wp_additional_image_sizes[ $_size ]['height'], 'crop' => $_wp_additional_image_sizes[ $_size ]['crop'] ); } } // Get only 1 size if found if ( $size ) { if( isset( $sizes[ $size ] ) ) { return $sizes[ $size ]; } else { return false; } } return $sizes; } endif; if ( ! function_exists( 'blossom_studio_get_fallback_svg' ) ) : /** * Get Fallback SVG */ function blossom_studio_get_fallback_svg( $post_thumbnail ) { if( ! $post_thumbnail ){ return; } $image_size = blossom_studio_get_image_sizes( $post_thumbnail ); if( $image_size ){ ?>
    tag. */ do_action( 'wp_body_open' ); } endif; if ( ! function_exists( 'blossom_studio_comment_toggle' ) ): /** * Function toggle comment section position */ function blossom_studio_comment_toggle(){ $comment_postion = get_theme_mod( 'toggle_comments', false ); if ( $comment_postion ) { $priority = 5; }else{ $priority = 45; } return absint( $priority ) ; } endif; /** * Is Blossom Theme Toolkit active or not */ function blossom_studio_is_bttk_activated(){ return class_exists( 'Blossomthemes_Toolkit' ) ? true : false; } /** * Is BlossomThemes Email Newsletters active or not */ function blossom_studio_is_btnw_activated(){ return class_exists( 'Blossomthemes_Email_Newsletter' ) ? true : false; } /** * Is BlossomThemes Social Feed active or not */ function blossom_studio_is_btif_activated(){ return class_exists( 'Blossomthemes_Instagram_Feed' ) ? true : false; } /** * Query WooCommerce activation */ function blossom_studio_is_woocommerce_activated() { return class_exists( 'woocommerce' ) ? true : false; } /** * Check if Contact Form 7 Plugin is installed */ function blossom_studio_is_cf7_activated(){ return class_exists( 'WPCF7' ) ? true : false; } /** * Query Jetpack activation */ function blossom_studio_is_jetpack_activated( $gallery = false ){ if( $gallery ){ return ( class_exists( 'jetpack' ) && Jetpack::is_module_active( 'tiled-gallery' ) ) ? true : false; }else{ return class_exists( 'jetpack' ) ? true : false; } } /** * Checks if elementor is active or not */ function blossom_studio_is_elementor_activated(){ return class_exists( 'Elementor\\Plugin' ) ? true : false; } /** * Checks if elementor has override that particular page/post or not */ function blossom_studio_is_elementor_activated_post(){ if( blossom_studio_is_elementor_activated() ){ global $post; $post_id = $post->ID; return \Elementor\Plugin::$instance->db->is_built_with_elementor( $post_id ) ? true : false; }else{ return false; } } /** * Checks if classic editor is active or not */ function blossom_studio_is_classic_editor_activated(){ return class_exists( 'Classic_Editor' ) ? true : false; } if ( ! function_exists( 'blossom_studio_page_header' ) ) : /** * Page Header */ function blossom_studio_page_header() { if( is_singular( 'post' ) ) return false; $blog_main_title = get_theme_mod( 'blog_main_title', __( 'From My Blog', 'blossom-studio' ) ); $blog_main_content = get_theme_mod( 'blog_main_content' ); ?>
    ', '' ); ?>
    found_posts > 0 ) { $posts_per_page = get_option( 'posts_per_page' ); $paged = ( get_query_var( 'paged' ) ) ? absint( get_query_var( 'paged' ) ) : 1; $start_post_number = 0; $end_post_number = 0; if( $wp_query->found_posts > 0 && !( blossom_studio_is_woocommerce_activated() && is_shop() ) ): $start_post_number = 1; if( $wp_query->found_posts < $posts_per_page ) { $end_post_number = $wp_query->found_posts; }else{ $end_post_number = $posts_per_page; } if( $paged > 1 ){ $start_post_number = $posts_per_page * ( $paged - 1 ) + 1; if( $wp_query->found_posts < ( $posts_per_page * $paged ) ) { $end_post_number = $wp_query->found_posts; }else{ $end_post_number = $paged * $posts_per_page; } } printf( esc_html__( '%1$s Showing: %2$s - %3$s of %4$s RESULTS %5$s', 'blossom-studio' ), '', absint( $start_post_number ), absint( $end_post_number ), esc_html( number_format_i18n( $wp_query->found_posts ) ), '' ); endif; } } endif; if( ! function_exists( 'blossom_studio_header_image_markup' ) ): /** * Counts the Number of total posts in Archive, Search and Author */ function blossom_studio_header_image_markup(){ $c_header_details = ''; $c_header_details = get_header_image(); if( ! has_header_video() ) { if( $c_header_details ) { echo '
    '; } }else{ if( $c_header_details && get_header_video_url() ) { echo '
    '; } } } endif;