$cat_id ) : $args = array( 'post_type' => 'post', 'posts_per_page' => absint( 10 ), 'cat' => absint( $cat_id ), 'ignore_sticky_posts' => true, ); // Run The Loop. $query = new WP_Query( $args ); $content[$i] = array(); if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); $page_post[$i]['id'] = get_the_id(); $page_post[$i]['title'] = get_the_title(); $page_post[$i]['excerpt'] = blogendar_trim_content( 40 ); $page_post[$i]['url'] = get_the_permalink(); $page_post[$i]['image'] = has_post_thumbnail() ? get_the_post_thumbnail_url( get_the_id(), 'post-thumbnail' ) : get_template_directory_uri() . '/assets/uploads/no-featured-image-590x650.jpg'; // Push to the main array. array_push( $content[$i], $page_post[$i] ); endwhile; endif; wp_reset_postdata(); $i++; endforeach; if ( ! empty( $content ) ) { $input = $content; } return $input; } endif; // slider section content details. add_filter( 'blogendar_filter_tabs_section_details', 'blogendar_get_tabs_section_details' ); if ( ! function_exists( 'blogendar_render_tabs_section' ) ) : /** * Start slider section * * @return string slider content * @since Blogendar 1.0.0 * */ function blogendar_render_tabs_section( $content_details = array() ) { $options = blogendar_get_theme_options(); $cats = ! empty( $options['tabs_category'] ) ? $options['tabs_category'] : array(); $all_content = array(); if ( empty( $content_details ) ) { return; } ?>
$contents) : ?>