'post', 'post_status' => 'publish', 'posts_per_page' => bloghash_option( 'ticker_post_number' ), // phpcs:ignore WordPress.WP.PostsPerPage.posts_per_page_posts_per_page 'ignore_sticky_posts' => true, ); $tax_query = array( array( 'taxonomy' => 'post_format', 'field' => 'slug', 'terms' => array( 'post-format-quote' ), 'operator' => 'NOT IN', ), ); $bloghash_ticker_categories = array_filter( array_map( 'absint', (array) bloghash_option( 'ticker_category' ) ) ); // If categories are specified if ( ! empty( $bloghash_ticker_categories ) ) { $tax_query[] = array( 'taxonomy' => 'category', 'field' => 'term_id', 'terms' => $bloghash_ticker_categories, 'operator' => 'IN', ); } $bloghash_args['tax_query'] = $tax_query; $bloghash_args = apply_filters( 'bloghash_ticker_query_args', $bloghash_args ); $bloghash_posts = new WP_Query( $bloghash_args ); // No posts found. if ( ! $bloghash_posts->have_posts() ) { return; } $bloghash_ticker_items_html = ''; $bloghash_ticker_elements = (array) bloghash_option( 'ticker_elements' ); $bloghash_ticker_type = bloghash_option( 'ticker_type' ); $bloghash_ticker_slide = $bloghash_ticker_type === 'one-ticker' ? 'ticker-item' : ''; while ( $bloghash_posts->have_posts() ) : $bloghash_posts->the_post(); // Post items HTML markup. ob_start(); ?>