max_num_pages ) || ! is_numeric( $query->max_num_pages ) || $query->max_num_pages < 2 ) { return; } $paged = get_query_var( 'paged' ); if ( ! $paged && is_front_page() && ! is_home() ) { $paged = get_query_var( 'page' ); } $paged = $paged ? intval( $paged ) : 1; $pagenum_link = html_entity_decode( get_pagenum_link() ); $query_args = array(); $url_parts = explode( '?', $pagenum_link ); if ( isset( $url_parts[1] ) ) { wp_parse_str( $url_parts[1], $query_args ); } $pagenum_link = remove_query_arg( array_keys( $query_args ), $pagenum_link ); $pagenum_link = trailingslashit( $pagenum_link ) . '%_%'; $html_prev = ' Prev'; $html_next = 'Next '; $links = paginate_links( array( 'base' => $pagenum_link, 'total' => $query->max_num_pages, 'current' => $paged, 'mid_size' => 2, 'add_args' => array_map( 'urlencode', $query_args ), 'prev_text' => $html_prev, 'next_text' => $html_next, 'type' => 'array', ) ); $bizindustries_animation = get_theme_mod( 'bizindustries_animation_disable', 0 ) ? 'animate-box':''; if ( is_array( $links ) ) { $r = '"; printf( $r ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } endif; function bizindustries_render_posts_pagination() { /** * Pagination for archive. * Since 1.0.0 */ $pagination_type = get_theme_mod( 'pagination_type', 'numeric' ); if ( 'default' === $pagination_type ) : the_posts_navigation(); else : bizindustries_get_posts_pagination(); endif; } add_action( 'bizindustries_posts_pagination', 'bizindustries_render_posts_pagination', 10 ); if ( ! function_exists( 'bizindustries_related_posts' ) ) : /** * Display the related posts. * Since 1.0.0 */ function bizindustries_related_posts() { wp_reset_postdata(); global $post; $blog_single_layout = get_theme_mod( 'blog_single_layout', 'right-sidebar' ); if( $blog_single_layout == 'left-sidebar' || $blog_single_layout == 'right-sidebar' ) : $posts_count = 2; else : $posts_count = 3; endif; // Define shared post arguments $args = array( 'no_found_rows' => true, 'update_post_meta_cache' => false, 'update_post_term_cache' => false, 'ignore_sticky_posts' => 1, 'orderby' => 'rand', 'post__not_in' => array( $post->ID ), 'posts_per_page' => $posts_count, ); // Related by categories. if ( get_theme_mod( 'related_post_choice', 'categories' ) == 'categories' ) { $cats = wp_get_post_categories( $post->ID, array( 'fields' => 'ids' ) ); $args['category__in'] = $cats; } // Related by tags. if ( get_theme_mod( 'related_post_choice', 'categories' ) == 'tags' ) { $tags = wp_get_post_tags( $post->ID, array( 'fields' => 'ids' ) ); $args['tag__in'] = $tags; if ( ! $tags ) { $break = true; } } $query = ! isset( $break ) ? new WP_Query( $args ) : new WP_Query(); return $query; } endif; if( ! function_exists( 'bizindustries_banner_image' ) ) : /** * Banner Image * Since 1.0.0 */ function bizindustries_banner_image(){ $blog_banner = get_header_image(); $page_banner = get_theme_mod( 'bizindustries_page_banner', get_header_image() ); $archive_banner = get_theme_mod( 'bizindustries_archive_banner', get_header_image() ); $search_banner = get_theme_mod( 'bizindustries_search_banner', get_header_image() ); $banner_404 = get_theme_mod( 'bizindustries_404_banner', get_header_image() ); if ( is_home() ){ $banner_image_url = ( ! empty( $blog_banner ) ) ? $blog_banner : get_header_image(); } elseif( is_page() ){ $banner_image_url = ( ! empty( $page_banner) ) ? $page_banner : get_header_image(); } elseif( is_singular() ){ $banner_image_url = get_the_post_thumbnail_url('full' ); $banner_image_url = ( ! empty( $banner_image_url) ) ? $banner_image_url : get_header_image(); } elseif( is_archive() ){ $banner_image_url = ( ! empty( $archive_banner) ) ? $archive_banner : get_header_image(); } elseif( is_search() ){ $banner_image_url = ( ! empty( $search_banner) ) ? $search_banner : get_header_image(); } elseif( is_404() ) { $banner_image_url = ( ! empty( $banner_404) ) ? $banner_404 : get_header_image(); } return $banner_image_url; } endif; if ( ! function_exists( 'bizindustries_page_header' ) ) : /** * Page Header */ function bizindustries_page_header(){ $banner_url = bizindustries_banner_image(); ?>

' . wp_kses_post( $read_more ). ''; return $new_link; } endif; add_filter('the_content_more_link', 'bizindustries_read_more_link'); if ( ! function_exists( 'bizindustries_auto_excerpt_more' ) ) : /** * Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and bizindustries_read_more_link(). */ function bizindustries_auto_excerpt_more( $more ) { if ( is_admin() ) { return $more; } $excerpt_dots = get_theme_mod('post_excerpt_dots'); return '' . wp_kses_post( $excerpt_dots ). ''; } endif; add_filter( 'excerpt_more', 'bizindustries_auto_excerpt_more' ); /** * Post meta info */ if ( ! function_exists( 'bizindustries_get_post_meta' ) ) : function bizindustries_get_post_meta() { $blog_meta_sort = get_theme_mod( 'blog_meta_sort', array('blog_author','blog_category','blog_date','blog_comment')); ?>
$blog_meta_sort_val ) : if ( 'blog_author' === $blog_meta_sort_val ) : ?>
' ' . '%title', 'prev_text' => ' ' . '%title', ) ); } endif; /** * Adding conatiner classes to body */ if ( ! function_exists( 'bizindustries_add_content_classes_to_body' ) ) : function bizindustries_add_content_classes_to_body($classes = '') { if('semi-width' == get_theme_mod('bizindustries_container_width')) : $classes[] = 'bizin-semi-width'; else : $classes[] = ''; endif; return $classes; } endif; add_filter('body_class', 'bizindustries_add_content_classes_to_body');