php grabbing every post made?
Based on WordPress template hierarchy, categories are displayed using the category.php template. So in other to display your preferred category, you’ll need to create a category.php file, and use the query below: $cat_query = new WP_Query( array( ‘post_type’ => ‘post’, ‘cat’ => $cat, //WordPress global for getting the current category ‘posts_per_page’ => 5, ) ); … Read more