Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for an interesting question. There are two ways to accomplish your goal.

    The WP_Query Class Reference lists several Tag Parameters. If you know the term ID values for the tags you want you can use them as follows:

    [mla_gallery tag__in=333 tag__not_in=380]

    There is also mention of a tag_slug__in parameter, so you might try:

    [mla_gallery tag_slug__in=birds-of-india tag_slug__not_in=kadi]

    Sadly, there is no tag_slug__not_in parameter, so this fails. You can use the more powerful Taxonomy Query to build a query with slug values:

    [mla_gallery tax_query="array(array('taxonomy'=>'post_tag','field'=>'slug','terms'=>'birds-of-india'),array('taxonomy'=>'post_tag','field'=>'slug','terms'=>'kadi','operator'=>'NOT IN'),'relation'=>'AND')"]

    The above examples use tags from my test system, but they should work fine with the proper term substitutions for your site.

    I am marking this topic resolved, but please update it if you have any problems with the above suggestions or further questions about queries on taxonomy terms. Thanks for your continued participation in the Support Forum.

    Thread Starter jhdean

    (@jhdean)

    Thanks David,

    The taxonomy query worked well. It was a bit daunting when I was looking at it in the documentation with all the array functions. Thanks for writing the example.

    Jeff

    Plugin Author David Lingren

    (@dglingren)

    Thank you for your update with the good news. I agree that the taxonomy (and date and metadata) query syntax is a triumph of power over simplicity.

    Thread Starter jhdean

    (@jhdean)

    Hi David,

    I just noticed that sometime recently, text I was mapping into the WordPress Description field no longer has the HTML tags that are in the image metadata. In this case I am mapping 2#120 Caption or Abstract into the Description field.

    The IPTC data has the
    and <p></p> tags in it which used to come through for formatting in captions in the MLA galleries. Now these are being filtered out and are not showing in the Media library or the galleries.

    Do you know what has changed or why this is happening?

    Thanks,
    Jeff

    Thread Starter jhdean

    (@jhdean)

    Sorry, thought I was starting a new post. I’ll do so.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Exclude particular tags’ is closed to new replies.