Title: MLA shortcode with external tag variable
Last modified: June 13, 2025

---

# MLA shortcode with external tag variable

 *  Resolved [tennico64](https://wordpress.org/support/users/tennico64/)
 * (@tennico64)
 * [12 months ago](https://wordpress.org/support/topic/mla-shortcode-with-external-tag-variable/)
 * I’m creating a wordpress page where i put this shortcode:
 * [mla_gallery attachment_tag=”{query:tag}”]
 * in order to create a dinamically page where the images showed are filtered by
   dinamically tag. I recall this page by following “/galleria-dinamica/?tag=TO”.
 * The command doesn’t work. If i try to run the shortcode
 * [mla_gallery attachment_tag=TO] it works fine. Where is the issue?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [12 months ago](https://wordpress.org/support/topic/mla-shortcode-with-external-tag-variable/#post-18511245)
 * Thanks for your question. You can make a simple adjustment to your shortcake 
   to get the results you want.
 * Add plus signs to the delimited, e.g. “{+tag+}”.
 * I am marking this topic resolved, but please an update if you have problems or
   further questions regarding the above suggestion. Thanks for your interest in
   the plugin.
 *  Thread Starter [tennico64](https://wordpress.org/support/users/tennico64/)
 * (@tennico64)
 * [12 months ago](https://wordpress.org/support/topic/mla-shortcode-with-external-tag-variable/#post-18511519)
 * Hi David,
 * thank you for your feedback. I have tried you suggestion adding + sign but it
   doesn’t work. I have tried any sign combination with or without “query” word 
   but it seems not able to read the “tag” parameter from URL “/galleria-dinamica/?
   tag=TO”.
 * There is any function in MLA setting i should enable to allow the custom field
   and query variable substitution in shortcode parameters?
 * Luca
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [12 months ago](https://wordpress.org/support/topic/mla-shortcode-with-external-tag-variable/#post-18511808)
 * My apologies; I’m traveling and typing this on a small screen.
 * Try attachment_tag=”{+request:tag÷}”. The request prefix is for URL query parameters,
   and the “query” prefix is for WordPress query variables. You might also pick 
   something other than “tag” for the parameter name since it’s a special name in
   some cases.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘MLA shortcode with external tag variable’ is closed to new replies.

 * ![](https://ps.w.org/media-library-assistant/assets/icon-256x256.png?rev=973502)
 * [Media Library Assistant](https://wordpress.org/plugins/media-library-assistant/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/media-library-assistant/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/media-library-assistant/)
 * [Active Topics](https://wordpress.org/support/plugin/media-library-assistant/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/media-library-assistant/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/media-library-assistant/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [David Lingren](https://wordpress.org/support/users/dglingren/)
 * Last activity: [12 months ago](https://wordpress.org/support/topic/mla-shortcode-with-external-tag-variable/#post-18511808)
 * Status: resolved