New answers tagged duplicates
That should only happen if, as you say, there is a post with the same unique permalink. Any in the trash will still have the same effect.
I got it! The result will show all attachments in a specific term inside term's archive page. Thanks Chip! <?php $queried_object = get_queried_object(); $term_id = $queried_object->term_id; global $wp_query; $original_query['tax_query'] = array( array( 'taxonomy' => 't-arte', 'terms' => $term_id, 'field' => 'id', ),); $original_query ...
I think the problem is that you're passing the wrong arguments to the $attachments query, causing you not to get the intended posts in the $attachments query. Here's what you're doing: $args = array( 'post_status' => 'inherit', 'numberposts' => 0, 'post__not_in' => array_merge($do_not_duplicate,get_option( 'sticky_posts' )), ...
Top 50 recent answers are included