I've got a problem with a query. I've got 4 different post_type. I would like to retrieve the posts from all post type from one category named 'une'. But it shows only post type from two post type => spectacles and post.
Here is my code :
<?php
query_posts(array(
'post_type' => array('post','videos','photos','spectacles'),
'showposts' => -1,
'category_name' => 'une',
)
); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<h1><?php the_title(); ?></h1>
<?php endwhile; else: ?>
<?php endif; ?>
It is like category_name doesn't work for my query.
categorytaxonomy as well as category une is associated with all the post types and posts. I think thecategorytaxonomy is not associated with all the post types. - CodeMascotregister_post_type( 'photos', array( 'labels' => array( 'name' => __( 'Photos' ), 'singular_name' => __( 'Photo' ) ), 'public' => true, 'taxonomies' => array('category','post_tag'), 'has_archive' => true, 'supports' => array('title','content','editor','excerpt','thumbnail'), ) );- Ben Belekcategorytaxonomy atphotospost type at backend dashboard ? - CodeMascot