Here's what I want to do:
With query_posts, the first part should look something like this I think:
<?php
query_posts(array(
'post_type' => 'post',
'tag' => "",
'paged' => $paged,
'comment_count' => '0',
'posts_per_page' => '10',
)); ?>
I have no idea what the second part should look like, but I think the whole thing needs to be in SQL form in order to be able to update the tags for the found posts.
Any help would be much appreciated!
$tag_name = 'your tag';
$posts = new WP_Query( array(
'post_type' => 'post',
'paged' => $paged,
'comment_count' => '0',
'posts_per_page' => '10',
));
if( $posts->have_posts() ): while( $posts->have_posts() ): $posts->the_post();
wp_set_post_tags( $post->ID, $tag_name );
endwhile; endif; wp_reset_query();