[wp-hackers] tag__in and tag__and query vars empty for tag unions and intersections

Benedict Eastaugh ionfish at gmail.com
Mon Oct 22 16:29:08 GMT 2007


I've been writing some code to allow a theme to display multiple tag
titles for tag intersections and unions, so for example if your query
string looks like this:

tag=john+paul+george+ringo

then the resultant title might look like this:

"You are browsing posts tagged with John, Paul, George and Ringo"

Now, I have this all working fine, save for the part that gets a list
of tag ids from WordPress. tag_slug__in and tag_slug__and are
populated for unions and intersections respectively, and presumably
WordPress must be getting that list of tag ids somehow, so it can
display the correct posts. However, although the tag_id query var is
set (albeit only for the first tag in an intersection or union) the
tag__in and tag__and query vars appear to be empty for tag unions and
intersections.

What I'm wondering is why the tag__in and tag__and query vars aren't
populated in these instances, since it would be be useful to be able
to pull that data directly rather than querying the database again
with the tag slugs. Thanks in advance for any help that may be
rendered. Cheers,

Benedict.


More information about the wp-hackers mailing list