• Here are the ways you can filter posts through WP_Query:

    tag (string) – use tag slug.
    tag_id (int) – use tag id.
    tag__and (array) – use tag ids.
    tag__in (array) – use tag ids.
    tag__not_in (array) – use tag ids.
    tag_slug__and (array) – use tag slugs.
    tag_slug__in (array) – use tag slugs.

    It seems to be that one is missing. I want to be able to exclude posts with a tag determined by a SLUG, not an ID. Is there no way to do this?

    Am I looking at this the wrong way, or what would be the best way to filter OUT certain tags by using the tag SLUG? Typing out “tag_slug__not_in” makes sense, but is not supported.

    Why wouldn’t there be a reason to query every single post and exclude certain posts by tag slug?

  • The topic ‘tag_slug__not_in?’ is closed to new replies.