Title: [Plugin: Custom Post Type UI] Filter loop by categories
Last modified: August 19, 2016

---

# [Plugin: Custom Post Type UI] Filter loop by categories

 *  [lawyer01](https://wordpress.org/support/users/lawyer01/)
 * (@lawyer01)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-post-type-ui/)
 * Thanks for the plugin, very neat.
 * I have created custom post type called “Products” with three different categories
   in it: “Cars”, “Planes”, “Bikes”.
 * I can easely list **all** the products on a custom template with:
 *     ```
       $loop = new WP_Query( array( 'post_type' => 'products', 'posts_per_page' => 10 ) );
       while ( $loop->have_posts() ) : $loop->the_post();
         the_title();
         echo '<div class="entry-content">';
         the_content();
         echo '</div>';
       endwhile;
       ```
   
 * How do I filter the loop **by categories** for example just to get the cars?
 * can I add something like ‘post_category’ => ‘cars’ ?
 * Thank you!

Viewing 1 replies (of 1 total)

 *  Thread Starter [lawyer01](https://wordpress.org/support/users/lawyer01/)
 * (@lawyer01)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-post-type-ui/#post-1666546)
 * Oh, and whats the code to print all the taxonomies, that comes with the posts?

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: Custom Post Type UI] Filter loop by categories’ is closed to
new replies.

## Tags

 * [categories](https://wordpress.org/support/topic-tag/categories/)
 * [custom post type](https://wordpress.org/support/topic-tag/custom-post-type/)
 * [posts](https://wordpress.org/support/topic-tag/posts/)

 * 1 reply
 * 1 participant
 * Last reply from: [lawyer01](https://wordpress.org/support/users/lawyer01/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-post-type-ui/#post-1666546)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
