• Resolved ex19

    (@ex19)


    I have two tags and both need to be present- is there a syntax here that will say

    show from dropdown, november .and. 1978 only.
    because this one shows also january 1978

    attachment_tag=”{+request:tag1+},{+request:tag2+}

    I originally had it working with a category and a tag but it was too cumbersome to add hundreds of categories in the att categories page.

    Thank you!

    https://wordpress.org/plugins/media-library-assistant/

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

    (@dglingren)

    Thanks for your question. I hope I understand what you are trying to accomplish.

    As I understand it:

    • You have assigned year and month terms in the attachment_tag taxonomy to your items
    • You have a form with two dropdown controls, one for year and one for month
    • The values returned by the dropdown controls show up in the tag1 and tag2 query arguments
    • You want to require that an item must contain both the selected year and month to be included in your [mla_gallery] display

    If that’s all correct you can accomplish your goal by adding a tax_operator parameter to your [mla_gallery] shortcode. You can read all about it in the ‘Simple Taxonomy Parameters, “tax_operator”‘ section of the Settings/Media Library Assistant Documentation tab. For example, you can code something like:

    [mla_gallery attachment_tag="{+request:tag1+},{+request:tag2+}" tax_operator=AND]

    And, of course, adding any other parameters your application requires. If you need more complex taxonomy queries you can follow the ‘Taxonomy Queries, the “tax_query”‘ section of the Documentation tab.

    I am marking this topic resolved, but please update it if you have any problems or further questions regarding the above suggestions. Thank you for your interest in the plugin.

Viewing 1 replies (of 1 total)
  • The topic ‘attachment tag filtering’ is closed to new replies.