'post', 'posts_per_page' => absint( 5 ), 'ignore_sticky_posts' => true, ); if ( ! empty( array_filter( $recent_content_ids ) ) ) { $recent_args['post__in'] = array_filter( $recent_content_ids ); $recent_args['orderby'] = 'post__in'; } else { $recent_args['orderby'] = 'date'; } } else { $cat_content_id = get_theme_mod( 'ace_news_recent_news_content_category' ); $recent_args = array( 'cat' => $cat_content_id, 'posts_per_page' => absint( 5 ), ); } $recent_args = apply_filters( 'ace_news_banner_section_args', $recent_args ); if ( $slider_content_type === 'post' ) { for ( $i = 1; $i <= 3; $i++ ) { $slider_content_ids[] = get_theme_mod( 'ace_news_banner_slider_content_post_' . $i ); } $banner_slider_args = array( 'post_type' => 'post', 'post__in' => array_filter( $slider_content_ids ), 'orderby' => 'post__in', 'posts_per_page' => absint( 3 ), 'ignore_sticky_posts' => true, ); if ( ! empty( array_filter( $slider_content_ids ) ) ) { $banner_slider_args['post__in'] = array_filter( $slider_content_ids ); $banner_slider_args['orderby'] = 'post__in'; } else { $banner_slider_args['orderby'] = 'date'; } } else { $cat_content_id = get_theme_mod( 'ace_news_banner_slider_content_category' ); $banner_slider_args = array( 'cat' => $cat_content_id, 'posts_per_page' => absint( 3 ), ); } $banner_slider_args = apply_filters( 'ace_news_banner_section_args', $banner_slider_args ); ace_news_render_banner_section( $recent_args, $banner_slider_args ); /** * Render Banner Section. */ function ace_news_render_banner_section( $recent_args, $banner_slider_args ) { ?>