[wp-hackers] getting post counts for multiple tags

Chris McCoy chris at lod.com
Sun May 20 15:14:51 UTC 2012

What would be the best way to go about, finding the amount of posts for
multiple tags.

I will be using it on a tag archive page.

        $tag_count = get_term_by('name', get_query_var('tag'),'post_tag');
        echo $tag_count->count;

this works fine for one tag, but I want to check via tag1,tag2,tag3 and
tag1+tag2+tag3 how many posts match those

More information about the wp-hackers mailing list