How to Display Posts with a Specific Category in WordPress – Easy Guide


In this blog we will discuss how to display posts with specific categories.

To show Specific Category post in WordPress we have to enter category_name in array

Below is the code for how to post a specific category in WordPress.

 'post', 
'order' => 'DESC',
'category_name' => 'enter-your-category-name'
);
$the_query = new WP_Query( $args ); ?>

have_posts() ) : ?> 
have_posts() ) : $the_query->the_post(); ?>
 
 
 



Leave a Comment