WordPress.org

Plugin Directory

Doc's Auto-tags

Assigns tags and/or categories to posts containing specific text strings, handy for filtering within the loop.

Great, my newly saved posts are being auto-tagged. How do I filter posts by tag within the WordPress Loop?

An example of query_posts():

<?php query_posts("cat=-10&paged=$paged") ?>

Here's a cleaner version excluding posts tagged with tag ID 42:

<?php
$args = array(
    'category__not_in' => array( 10 ),
    'tag__not_in' => array( 42 ),
    'paged' => $paged,
    );
query_posts($args);
?>

Requires: 2.8 or higher
Compatible up to: 4.0.3
Last Updated: 2014-9-24
Active Installs: 100+

Ratings

5 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1
100,1,1
100,1,1