Title: WP_Query Cat parameter
Last modified: September 1, 2016

---

# WP_Query Cat parameter

 *  [Cronix90](https://wordpress.org/support/users/cronix90/)
 * (@cronix90)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/wp_query-cat-parameter/)
 * Hi!
 * I am trying to sort destinations (post type destination) by category.
 *     ```
       echo "Category ID: ".$category;
   
             $paged = get_query_var( 'paged' ) ? absint( get_query_var( 'paged' ) ) : 1;
               $args = array(
                 'post_type' => 'destination',
                 'posts_per_page' => $destinations_two_number,
                 'order' => $orderpost,
                 'orderby' => $orderby,
                 'paged' => $paged,
                 'cat' => $category
               );
               $wp_query = new WP_Query($args);
               while ($wp_query -> have_posts()) : $wp_query -> the_post();
               global $product;
               $params = array( 'width' => 555, 'height' => 370 );
               $image_thumbnail = bfi_thumb( wp_get_attachment_url(get_post_thumbnail_id()), $params );
       ```
   
 * Unfortunately I do not get any output. This [http://visitadria.kreativkessel.com/destination/villa-lilli/](http://visitadria.kreativkessel.com/destination/villa-lilli/)
   post should be definitly part of the cat 21!
 * Have I defined sth wrong in the code? Thank you for your help.
 * kind regards.

The topic ‘WP_Query Cat parameter’ is closed to new replies.

## Tags

 * [?cat](https://wordpress.org/support/topic-tag/cat/)
 * [category](https://wordpress.org/support/topic-tag/category/)
 * [parameter](https://wordpress.org/support/topic-tag/parameter/)
 * [post](https://wordpress.org/support/topic-tag/post/)
 * [post-type](https://wordpress.org/support/topic-tag/post-type/)
 * [wp_query](https://wordpress.org/support/topic-tag/wp_query/)

 * 0 replies
 * 1 participant
 * Last reply from: [Cronix90](https://wordpress.org/support/users/cronix90/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/wp_query-cat-parameter/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
