', '

' ); endif; } endif; if( ! function_exists( 'blog_postx_single_excerpt' ) ) : /** * Excerpt */ function blog_postx_single_excerpt() { } endif; if( ! function_exists( 'blog_postx_single_comments' ) ) : /** * Related Posts */ function blog_postx_single_comments( $comments_option ) { if( $comments_option ) : $comments_num = '' .get_comments_number( get_the_ID() ). ''; $global_comments_icon_picker = $global_comments_icon_picker = [ 'type' => 'icon', 'value' => 'fa-solid fa-comment' ]; if( $global_comments_icon_picker ) { $icon_html = blog_postx_get_icon_control_html($global_comments_icon_picker); if( $icon_html ) $comments_num = $icon_html . $comments_num ; } echo '' .$comments_num. ''; endif; } endif; if( ! function_exists( 'blog_postx_single_read_time' ) ) : /** * Read Time */ function blog_postx_single_read_time( $read_time_option ) { if( $read_time_option ) : $read_time_option = metadata_exists( 'post', get_the_ID(), 'read_time_option' ) ? get_post_meta( get_the_ID(), 'read_time_option', true ) : 'customizer'; $read_time_meta = metadata_exists( 'post', get_the_ID(), 'read_time' ) ? get_post_meta( get_the_ID(), 'read_time', true ) : '1 Mins'; $read_time = '' .( ( $read_time_option == 'customizer' ) ? blog_postx_post_read_time( get_the_content() ) : $read_time_meta ) . ''; $global_read_time_icon_picker = [ 'type' => 'icon', 'value' => 'fa-solid fa-book-open-reader' ]; if( $global_read_time_icon_picker ) { $icon_html = blog_postx_get_icon_control_html($global_read_time_icon_picker); if( $icon_html ) $read_time = $icon_html . $read_time; } echo '' .$read_time. ''; endif; } endif; if( ! function_exists( 'blog_postx_single_post_navigation' ) ) : /** * Table of content */ function blog_postx_single_post_navigation() { $previous = get_previous_post(); $next = get_next_post(); $prev_post_date = $prev_post_thumbnail = $prev_post_navigation_sub_title = ''; $next_post_date = $next_post_thumbnail = $next_post_navigation_sub_title = ''; // date $prev_post_date = ! empty( $previous ) ? '' . blog_postx_posted_on( $previous->ID, [ 'return' => true ] ) . '' : ''; $next_post_date = ! empty( $next ) ? '' . blog_postx_posted_on( $next->ID, [ 'return' => true ] ) . '' : ''; // thumbnail $prev_post_thumbnail = ( ! empty( $previous ) ) ? get_the_post_thumbnail_url( $previous->ID ) : ''; $next_post_thumbnail = ( ! empty( $next ) ) ? get_the_post_thumbnail_url( $next->ID ) : ''; // sub-title $prev_post_navigation_sub_title = ''; $next_post_navigation_sub_title = ''; // title $post_navigation_title = '%title'; the_post_navigation( [ 'prev_text' => '
'. $prev_post_navigation_sub_title .'
'. $prev_post_date . '
', 'next_text' => '
'. $next_post_date . '
'. $next_post_navigation_sub_title .'
' ] ); } endif; if( ! function_exists( 'blog_postx_single_author_box' ) ) : /** * Author Box */ function blog_postx_single_author_box() { ?>
', get_avatar( get_the_author_meta( 'ID' ) ), ''; echo '
'; echo '

', get_the_author(), '

'; if( ! empty( get_the_author_meta( 'description' ) ) ) echo '
', get_the_author_meta( 'description' ), '
'; echo '
'; ?>
'; blog_postx_post_thumbnail( $single_image_size ); $single_custom_class = ''; if( ! has_post_thumbnail() ) $single_custom_class = ' no-single-featured-image'; ?>
'; endif; } add_action( 'blog_postx_main_content_opening', 'blog_postx_get_layout_three_part', 30 ); endif; if( ! function_exists( 'blog_postx_get_layout_six_part' ) ) : /** * Renders contents of single post only for layout three * * @since 1.0.0 */ function blog_postx_get_layout_six_part() { if( ! is_single() ) return; $single_post_layout = BPX\blog_postx_get_customizer_option( 'single_post_layout' ); $single_layout_post_meta = metadata_exists( 'post', get_the_ID(), 'single_layout' ) ? get_post_meta( get_the_ID(), 'single_layout', true ) : 'customizer-layout'; if( ( in_array( $single_post_layout, [ 'layout-six' ] ) && $single_layout_post_meta == 'customizer-layout' ) || in_array( $single_layout_post_meta, [ 'layout-six' ] ) ) : $single_custom_class = 'entry-header'; ?>
'; blog_postx_post_thumbnail( $single_image_size ); if( $is_seven ) echo get_template_part( 'template-parts/single/partial', 'meta' ); echo '
'; endif; if( ! $is_seven ) echo get_template_part( 'template-parts/single/partial', 'meta' ); ?> 4, 'post__not_in' => array( get_the_ID() ), 'ignore_sticky_posts' => true, 'fields' => 'ids', 'no_found_rows' => true ); $post_categories = wp_get_post_categories( get_the_ID() ); $related_posts_args['category__in'] = $post_categories; $related_posts = new WP_Query( apply_filters( 'blog_postx_query_args_filter', $related_posts_args ) ); if( ! $related_posts->have_posts() ) return; $elementClass = 'single-related-posts-section-wrap layout--list layout--one column--three'; $meta_reorder = blog_postx_get_reorder_value( BPX\blog_postx_get_customizer_option( 'single_meta_reorder' ) ); ?>