count)) { $post_count = $cat_info->count; } else { $post_count = ''; } if (!empty( $cat_info->name)) { $term_name = $cat_info->name; }else { $term_name = ''; } if (!empty( $cat_info->term_id)) { $thumbnail_id = get_term_meta($cat_info->term_id, 'thumbnail_id', true); }else { $thumbnail_id = ''; } ?>
'post', 'post_status' => 'publish', 'no_found_rows' => 1, 'ignore_sticky_posts' => 1, 'posts_per_page' => 1, ); $category_post_args['tax_query'][] = array( 'taxonomy' => 'category', 'field' => 'term_id', 'terms' => absint($cat_info->term_id), ); $category_post = new WP_Query($category_post_args); while ($category_post->have_posts()) : $category_post->the_post(); ?>