Hi !
I wrote a little piece of code to display custom posts in a particular custom category.
And it works ;-)
I wanted to limit these posts to the ones who share at less 1 tag.
And it doesn't work... surprisingly ^^
<?php
$tags = wp_get_post_tags($post->ID);
$tag_ids = array();
foreach($tags as $individual_tag) $tag_ids[] = $individual_tag->term_id;
$args = array(
'post_type' => 'antidot-pages',
'antidot-taxo' => 'references',
'tag__in' => $tag_ids,
'post_status' => 'publish',
'posts_per_page' => 4,
'orderby' => 'rand'
);
$ref = new WP_Query( $args );
<?php while($ref->have_posts()) : $ref->the_post(); ?>
<div class="widget widget-solutions-refs">
<?php the_title(); ?>
</div>
<?php endwhile; ?>
Thanks to all for your help
PS : sorry, it's a local dev for now, no url to see