“MLA Tax Query Example” plugin syntax
-
Hi David,
thanks for the great plugin, the continuous hard work and tremendous support. All this is greatly appreciated.I have been using the plugin for a few years now. The amount of images on my site has now grown to the hundreds of thousands and as a?result I’ve recently been running into the 504 time-out issue as others have, before me.
After searching the forum I learned about the?“MLA Tax Query Example” plugin.?I installed it and activated it and have tried adapting my existing shortcodes to make it work. Unfortunately, after playing with it and looking at the examples I found on the forum, I’m still unable to replicate the galleries I was generating before…I was therefore hoping you could take a look at the kind of shortcode I was using before and hopefully give me some pointers on how to adapt it to make it work using the?my_custom_sql parameter.
So, here is an example of my current shortcode:?
[mla_gallery attachment_category="shoes" attachment_tag="galleries-sneakers,fw19-20" tax_operator=AND mla_target="_blank" link=file, full orderby=date order=DESC posts_per_page=200] [mla_gallery attachment_category="shoes" attachment_tag="galleries-sneakers,fw19-20" tax_operator=AND posts_per_page=200 mla_output=paginate_links]
I’ll try to explain my use case. I have a media library with attachment_categories such as: shoes, bags, accessories, store windows… And then I have a few dozen attachment_tags such as: year, month, season (e.g. fw19-20), type of shoes (e.g. sneakers, boots, etc.), and so on.
When I generate a gallery, I might want to output something like: FW19/20 Sneakers (which I get by using a shortcode that includes: category=shoes, tags=fw19-20,sneakers tax_operator=AND)(actually, the category=shoes is redundant and can be omitted while still getting the same result).
Now, I’ve been trying to replicate the above shortcode in many different ways using the?“MLA Tax Query Example” plugin but, as far as I understand, it can only accept ONE taxonomy=… argument, which means (please correct me if I’m wrong on this) I cannot use tax_operator=AND in order to query the images that are assigned BOTH tag=fw19-20 AND tag=sneakers.
I could achieve my desired outcome if I assigned a combined tag (e.g. sneakers-fw19-20) to the images I want to include in a gallery (so that I could then use attachment_tag=sneakers-fw19-20), but that would not be an ideal solution in my opinion.
I hope I was able to explain my problem clearly enough and I would greatly appreciate your input on this.
Thanks again!
Regards
Filippo
- The topic ‘“MLA Tax Query Example” plugin syntax’ is closed to new replies.