Title: WP_Query arguments for specific category
Last modified: August 24, 2016

---

# WP_Query arguments for specific category

 *  Resolved [ugurkirbac](https://wordpress.org/support/users/ugurkirbac/)
 * (@ugurkirbac)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/wp_query-arguments-for-specific-category/)
 * Hello,
    I’m very happy to use such a great plugin but I have a little problem.
 * I’m customising one theme and I need to fetch events as posts. This is the code
   I’m using but I cannot fetch the events with the corresponding category.
 *     ```
       $args = array('post_type' => 'event','posts_per_page' => $count, 'category_name' => 'featured');
   
       	$loop = new WP_Query( $args );
       ```
   
 * while ( $loop->have_posts() ) : $loop->the_post(); ?>
 * How can I retrieve the events based on the category in the theme’s page template?
   
   Do you have any suggestion about this?
 * Cheers
 * [https://wordpress.org/plugins/events-manager/](https://wordpress.org/plugins/events-manager/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Support [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * (@angelo_nwl)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/wp_query-arguments-for-specific-category/#post-5984950)
 * maybe this article can help you out – [http://www.3till7.net/2012/04/07/custom-wordpress-events-manager-event-tag-archive-page/](http://www.3till7.net/2012/04/07/custom-wordpress-events-manager-event-tag-archive-page/)
 * eg. use event-categories insteadof event-tags
 *  Thread Starter [ugurkirbac](https://wordpress.org/support/users/ugurkirbac/)
 * (@ugurkirbac)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/wp_query-arguments-for-specific-category/#post-5984953)
 * It solved the problem Thanks a lot.
    This is the code for whom might have the
   same problem.
 *     ```
       $args = array(
       	'post_type' => 'event',
       	'tax_query' => array(
       		array(
       			'taxonomy' => 'event-categories',
       			'field'    => 'slug',
       			'terms'    => 'featured',
       		),
       	),
       );
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘WP_Query arguments for specific category’ is closed to new replies.

 * ![](https://ps.w.org/events-manager/assets/icon-256x256.png?rev=1039078)
 * [Events Manager - Calendar, Bookings, Tickets, and more!](https://wordpress.org/plugins/events-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/events-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/events-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/events-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-manager/reviews/)

## Tags

 * [event-manager](https://wordpress.org/support/topic-tag/event-manager/)
 * [wp_query](https://wordpress.org/support/topic-tag/wp_query/)

 * 2 replies
 * 2 participants
 * Last reply from: [ugurkirbac](https://wordpress.org/support/users/ugurkirbac/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/wp_query-arguments-for-specific-category/#post-5984953)
 * Status: resolved