Title: Multiple Attributes for Alternate Shortcode
Last modified: March 10, 2020

---

# Multiple Attributes for Alternate Shortcode

 *  Resolved [nicegamer7](https://wordpress.org/support/users/nicegamer7/)
 * (@nicegamer7)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/multiple-attributes-for-alternate-shortcode/)
 * Is it possible to pass multiple attachment-specific parameters to an alternate
   shortcode, and as content as well?
 * For example
    `[mla_gallery attachment_category="the-cat" numberposts=1 mla_alt_shortcode
   ="alt" mla_alt_ids_name="source" mla_alt_ids_value="{+filelink_url+}" thumb="{
   +fileurl+}" type="thumb"]{+title+}[/mla_gallery]`
 * Is there any way to make the above substitutions work?

Viewing 1 replies (of 1 total)

 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/multiple-attributes-for-alternate-shortcode/#post-12533640)
 * Thanks for an interesting question.
 * There are no features in the current MLA version along these lines. In the specific
   case you propose, with exactly one item passed to the alternate shortcode, a 
   solution is possible. In the general case of multiple items it doesn’t make sense.
 * After giving it some thought the best solution I can think of would be to create
   an intermediate shortcode to perform the substitutions. You would use MLA to 
   find the ID value of the item you want and pass that along to some new shortcode,
   e.g., “my substitute”. That new shortcode would use the `ids=` parameter to identify
   the item you want and populate the other parameters. You can use MLA’s `MLAShortcodes::
   mla_get_data_source()` function to process the values you need. The new shortcode
   can be added to your theme’s `functions.php` file or packaged in a small custom
   plugin.
 * I am marking this topic resolved, but if that solution would work for you and
   you need more specific guidance, post an update and let me know. Thanks for your
   interest in MLA.

Viewing 1 replies (of 1 total)

The topic ‘Multiple Attributes for Alternate Shortcode’ 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/)

 * 1 reply
 * 2 participants
 * Last reply from: [David Lingren](https://wordpress.org/support/users/dglingren/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/multiple-attributes-for-alternate-shortcode/#post-12533640)
 * Status: resolved