'post', 'posts_per_page' => absint( $no_of_ticker_posts ), 'post_status' => 'publish', 'no_found_rows' => 1, 'ignore_sticky_posts' => 1, 'orderby' => esc_attr( $ticker_posts_orderby ), 'order' => esc_attr( $ticker_posts_order ), ); // Check for category. if ( ! empty( $ticker_posts_cat ) ) : $post_args['tax_query'] = array( array( 'taxonomy' => 'category', 'field' => 'term_id', 'terms' => $ticker_posts_cat, ), ); endif; $ticker_posts = new WP_Query( $post_args ); if ( $ticker_posts->have_posts() ) : $ticker_label_text = get_theme_mod( 'ticker_label_text' ); $ticker_label_style = get_theme_mod( 'ticker_label_style', 'style_3' ); $wrapper_class = ' ticker-label-' . $ticker_label_style; $enabled_post_meta = get_theme_mod( 'ticker_posts_meta', array( 'date' ) ); $meta_settings = array( 'date_format' => get_theme_mod( 'ticker_posts_date_format', 'format_2' ), 'show_icons' => false, ); $show_category = get_theme_mod( 'show_ticker_posts_category' ); if ( $show_category ) : $cat_style = get_theme_mod( 'ticker_posts_category_style', 'style_2' ); $color = get_theme_mod( 'ticker_posts_category_color_display', 'as_bg' ); $limit = get_theme_mod( 'ticker_posts_category_limit', 1 ); endif; $show_posts_thumbnail = get_theme_mod( 'show_ticker_posts_thumbnail', true ); if ( get_theme_mod( 'circle_ticker_posts_thumbnail' ) ) { $wrapper_class .= ' ticker-round-thumb'; } // Build attributes. $data_slider = array(); $data_slider['spaceBetween'] = 0; $data_slider['slidesPerView'] = 1; $data_slider['autoplay'] = array( 'delay' => absint( get_theme_mod( 'ticker_posts_speed', 3500 ) ), 'disableOnInteraction' => false, ); $data_slider['loop'] = true; $data_slider['effect'] = 'fade'; $data_slider['fadeEffect'] = array( 'crossFade' => true, ); $data_slider['navigation'] = array( 'nextEl' => '.section-ticker .swiper-button-next', 'prevEl' => '.section-ticker .swiper-button-prev', ); if ( get_theme_mod( 'stack_ticker_responsive', true ) ) { $wrapper_class .= ' stack-ticker-responsive'; } // Inverted. if ( 'dark' == get_theme_mod( 'ticker_theme', 'light' ) ) { $wrapper_class .= ' saga-block-inverted-color'; } $label_class = get_theme_mod( 'hide_ticker_label_responsive' ) ? ' hide-on-mobile ' : ''; $cat_class = get_theme_mod( 'hide_ticker_category_responsive', true ) ? ' hide-on-mobile ' : ''; $meta_class = get_theme_mod( 'hide_ticker_meta_responsive', true ) ? ' hide-on-mobile ' : ''; $arrows_class = get_theme_mod( 'hide_ticker_arrows_responsive' ) ? ' hide-on-mobile ' : ''; $thumbnail_class = get_theme_mod( 'hide_ticker_thumbnail_responsive' ) ? ' hide-on-mobile ' : ''; ?>
'; elseif ( 'style_3' == $ticker_label_style ) : blogbyte_the_theme_svg( 'popular' ); endif; ?>
have_posts() ) : $ticker_posts->the_post(); ?>