wp_query with multiple custom post type is not working
-
Hello all, i have this simple code:
$blog = new WP_Query( array( 'post_type' => array( 'eventi' , 'locali' ), 'posts_per_page' => 6 , 'post__not_in' => get_option( 'sticky_posts' ), 'paged' => $paged ) );Of course i declared both ‘eventi’ and ‘locali’ post types. In fact, if i use one of them, the loop works fine. But if use both of them, no posts are showed. Even if i use just this other code:
$blog = new WP_Query( array( 'post_type' => array( 'eventi' , 'locali' ), ) );No posts are showed. What should i do? Thanks!!! 🙂
The topic ‘wp_query with multiple custom post type is not working’ is closed to new replies.