Code To Find List Of Posts Which Has No Tags In WordPress Blog

Posted by


In order to find and display the untagged posts in blog, you need to use this code:

<?php query_posts(‘orderby=title&order=asc&showposts=-1’); ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
$tag = get_the_tags();
if (!$tag) { //Theses posts have no tags
endif; ?>

Add this code in any template where you want to display untagged posts of the blog.

That’s it!


Shane G.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.