Here’s what I want to do:
- Find 10 posts that do not have any tags and whose comment count = 0
- Tag those 10 posts with a tag “tag_name”
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!
1 comment