Title: post e custom post type in the same query
Last modified: August 20, 2016

---

# post e custom post type in the same query

 *  [vitorml](https://wordpress.org/support/users/vitorml/)
 * (@vitorml)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/post-e-custom-post-type-in-the-same-query/)
 * Hello, I want to know how it’s possible doing a query that returns posts and 
   posts under custom post type. This is my code, but it doesn’t work.
 *     ```
       $args = array( 'posts_per_page' => 4, 'post_type' => array('post', 'programacao-vila'),
               'tax_query' => array(
                   array(
                       'taxonomy' => 'eventos',
                       'field' => 'id',
                       'terms' => $atts['term']
                   )
               ),
               'cat' => $atts['cat'], 'order' => 'DESC');
       $wp_query_slide = new WP_Query( $args );
       ```
   
 * thanks

The topic ‘post e custom post type in the same query’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [vitorml](https://wordpress.org/support/users/vitorml/)
 * Last activity: [13 years, 11 months ago](https://wordpress.org/support/topic/post-e-custom-post-type-in-the-same-query/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
