Support » Plugin: Media Tags » [Plugin: Media Tags] tags_compare AND bug

  • I have three Media-Tags, tag1, tag2 and tag3.

    I’m using tags_compare to grab all images tagged with $tag and tag3.


    If $tag equals tag4, a non-existent Media-Tag, the results return every image tagged with tag3. I was expecting it to return zero results.

    Just something I noticed. Thanks for the great plugin!

    (Version 3.0.5)

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Paul Menard


    3r1c, Thanks for the bug report. I’ll be working on updating Media-Tags to support some changes coming in WordPress 3.5. So will look into this issue. Thanks.

    @3rc1 – might the probably be that your slugs don’t match your tags? I was having a similar problem to what you described. I noticed a comment in the code that indicates AND comparisons need to search via slugs and not names. In my case, the slugs and names did not match up so the query was not returning the results I expected.

    The comment in the plugin reads:

    Force ‘OR’ on compare if searching by name (not slug). This is because the name search will return multiple values per each ‘media_tags’ searched item.

    Once I had the proper slugs going into the parameters instead of the names, the AND comparison was working successfully.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Media Tags] tags_compare AND bug’ is closed to new replies.