'post', 'posts_per_page' => $no_of_trending_posts, 'post_status' => 'publish', 'no_found_rows' => 1, 'orderby' => $orderby, 'order' => $order, 'ignore_sticky_posts' => 1 ); if (!empty($trending_cat)) { $post_args['tax_query'][] = array( 'taxonomy' => 'category', 'field' => 'term_id', 'terms' => absint($trending_cat), ); } $trending_posts = new WP_Query($post_args); if ($trending_posts->have_posts()): ?>
'post', 'post_status' => 'publish', 'no_found_rows' => 1, 'ignore_sticky_posts' => 1, ); $banner_content_from = blog_tale_get_option('banner_content_from'); if ('category' == $banner_content_from) { $banner_post_cat = blog_tale_get_option('banner_post_cat'); $no_of_banner_posts = absint(blog_tale_get_option('no_of_banner_posts')); $banner_posts_orderby = esc_attr(blog_tale_get_option('banner_posts_orderby')); $banner_posts_order = esc_attr(blog_tale_get_option('banner_posts_order')); $post_args['posts_per_page'] = $no_of_banner_posts; $post_args['orderby'] = $banner_posts_orderby; $post_args['order'] = $banner_posts_order; if (!empty($banner_post_cat)) { $post_args['tax_query'][] = array( 'taxonomy' => 'category', 'field' => 'term_id', 'terms' => absint($banner_post_cat), ); } } else { $banner_post_ids = blog_tale_get_option('banner_post_ids'); if (!empty($banner_post_ids)) { $post_ids = explode(',', esc_attr($banner_post_ids)); $post_args['post__in'] = $post_ids; $post_args['orderby'] = 'post__in'; $post_args['posts_per_page'] = count($post_ids); } } $banner_posts = new WP_Query($post_args); if ($banner_posts->have_posts()): $banner_class = 'be-owl-banner-carousel'; $items = 2; $margin = 0; $container_class = ''; $data_center = false; $banner_layout = blog_tale_get_option('banner_layout'); $banner_display_as = blog_tale_get_option('banner_display_as'); if('boxed' == $banner_layout){ $container_class = 'wrapper'; } if ('slider' == $banner_display_as) { $slider_style = blog_tale_get_option('banner_slider_style'); $banner_class = 'be-owl-carousel-slider'; $items = 1; $image_size = 'blog-tale-slide-boxed'; if('full-width' == $banner_layout){ $image_size = 'blog-tale-slide-full'; } $banner_style = 'be-banner-slider-'.$slider_style; if('style_3' == $slider_style){ $data_animatein = 'flipInX'; $data_animateout = 'slideOutDown'; $banner_overlay = ''; $banner_overlay_class = 'bt-overlay-enabled'; } }else{ $carousel_style = blog_tale_get_option('banner_carousel_style'); $margin = blog_tale_get_option('banner_carousel_margin'); $image_size = 'blog-tale-carousel-boxed'; if('full-width' == $banner_layout){ $image_size = 'blog-tale-carousel-full'; } if('style_3' == $carousel_style){ $items = 3; } if('style_4' == $carousel_style){ $items = 2; $data_center = true; } $banner_style = 'be-banner-carousel-'.$carousel_style; } $disable_banner_autoplay = blog_tale_get_option('disable_banner_autoplay'); $disable_banner_loop = blog_tale_get_option('disable_banner_loop'); $show_banner_dots = blog_tale_get_option('show_banner_dots'); $hide_banner_nav = blog_tale_get_option('hide_banner_nav'); $data_speed = blog_tale_get_option('banner_speed'); $show_banner_category = blog_tale_get_option('show_banner_category'); $show_banner_meta = blog_tale_get_option('show_banner_meta'); ?>