0815

Du musst dich anmelden um Beiträge und Themen zu erstellen. Einloggen · Registrieren

Display a List of All Untagged Posts

Here is an easy way to display a list of all untagged posts. All that’s required is a custom loop and a quick check of the get_the_tags variable. Here is the code to make it work:

<?php query_posts('orderby=title&order=asc&showposts=-1'); ?>
<?php if (have_posts()) : ?> 
	<ul>
	<?php while (have_posts()) : the_post(); ?>
	<?php $tag = get_the_tags(); if (!$tag) { ?>

		<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
		<?php edit_post_link('Edit', ' ',''); ?></li>

	<?php } ?>
	<?php endwhile; ?>
	</ul>
<?php endif; ?>

Place that snippet into the theme file of your choice and navigate to that page in a browser to see a permlink-linked list of all posts that have not yet been tagged. Even better, next to each post title will be a an easy-access “Edit” link that will make it easy to quickly edit each of your untagged posts and add some tags, if necessary. Nothing on this planet could be easier. Almost.




0