Thanks for the update and the follow-on question.
MLA uses the WordPress database query functions, and the taxonomy queries can be very slow on larger sites such as yours. You might be able to improve things by installing and using the “MLA tax query Example” plugin developed for several earlier topics such as this one:
Slow queries
To get the example plugin, navigate to the Settings/Media library Assistant Documentation tab and click the “Example Plugins” button. Type “SQL” in the text box and click “Search Plugins” to filter the table.
You are looking for the “MLA tax query Example” plugin. Find that plugin and hover over the title in the left-most column. Click the “Install” rollover action, then go to the WordPress Plugins/Installed Plugins submenu and activate the example plugin as you would any other plugin. Make sure you have the latest version, 1.10, installed.
Once the example plugin is installed and active you can modify your [mla_gallery]
shortcode to use the alternate SQL query. Your shortcode would look something like:
[mla_gallery my_custom_sql="attachment_tag=my-tag" orderby=date order=DESC numberposts=5]
You can also try moving the sort criteria inside the my_custom_sql
parameter, i.e.:
[mla_gallery my_custom_sql="attachment_tag=my-tag orderby=date order=DESC" numberposts=5]
The change is small; move the closing quote from my-tag
to DESC
.
It would be great if you can install the example plugin and let me know how it works for you.