[wp-hackers] query_posts tag parameters

Jason jason at findingsimple.com
Mon Sep 21 02:05:57 UTC 2009


Thanks = Yeah only appears to like the tag ID's.

I assumed from the Codex it is supposed to work with slugs/tag names as
well.

On Mon, Sep 21, 2009 at 11:55 AM, John Blackbourn
<johnbillion+wp at gmail.com<johnbillion%2Bwp at gmail.com>
> wrote:

> I think you may have to use either the tag slug (so 'mariage' instead
> of 'Marriage') or the tag ID (eg. 3). Haven't got an install handy to
> double check though.
>
> John.
>
> 2009/9/21 Jason <jason at findingsimple.com>:
> > Hi All
> >
> > I am trying to do a basic tag query using the following tag parameters
> >
> > query_posts(array('tag__in' => array('Marriage') ) );
> > query_posts(array('tag__and' => array('Marriage') ) );
> > query_posts(array('tag__not_in' => array('Marriage') ) );
> >
> > But they don't appear to be working - this is the first time I've tried
> to
> > use them so wanted to check:
> > a) If i doing it properly; and if so
> > b) If this is a known problem or if it is just me?
> >
> > query_posts('tag=xxx'); appears to be working so I am stumped.
> >
> > Using MU latest version.
> >
> > Thanks in advance.
> > Jason
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list