Title: Edit Shortcode to Open pdf
Last modified: March 7, 2017

---

# Edit Shortcode to Open pdf

 *  Resolved [upandrunningdesign](https://wordpress.org/support/users/upandrunningdesign/)
 * (@upandrunningdesign)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/edit-shortcode-to-open-pdf/)
 * Noob here. What do I need to do to this shortcode to have the link open in a 
   new tab (_blank) and open the pdf instead of going to another with a link to 
   the pdf? Thanks in advance for any and all help! 🙂
 * `[mla_gallery post_mime_type="application/pdf" size=icon mla_caption="{+title
   +}" tax_query="array(array('taxonomy'=>'attachment_category','field'=>'slug','
   terms'=>'cowcalf'),array('taxonomy'=>'attachment_tag','field'=>'slug','terms'
   =>'cowcalf'),'relation'=>'OR')"]`

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

 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/edit-shortcode-to-open-pdf/#post-8885943)
 * Thanks for your question and for including the complete text of your shortcode.
 * You can get the results you want by adding `link=file` and `mla_target="_blank"`
   parameters to your shortcode:
 *     ```
       [mla_gallery]
       post_mime_type="application/pdf"
       size=icon
       link=file
       mla_target="_blank"
       mla_caption="{+title+}"
       tax_query="array(array('taxonomy'=>'attachment_category','field'=>'slug','terms'=>'cowcalf'),array('taxonomy'=>'attachment_tag','field'=>'slug','terms'=>'cowcalf'),'relation'=>'OR')"
       [/mla_gallery]
       ```
   
 * I have used the alternate “enclosing shortcode” syntax to make the parameters
   easier to see and to avoid WordPress parsing problems with complex shortcodes,
   e.g., the `tax_query`.
 * 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.
    -  This reply was modified 9 years, 2 months ago by [David Lingren](https://wordpress.org/support/users/dglingren/).
 *  Thread Starter [upandrunningdesign](https://wordpress.org/support/users/upandrunningdesign/)
 * (@upandrunningdesign)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/edit-shortcode-to-open-pdf/#post-8889865)
 * Thank you! That worked perfect.

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

The topic ‘Edit Shortcode to Open pdf’ 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/)

 * 2 replies
 * 2 participants
 * Last reply from: [upandrunningdesign](https://wordpress.org/support/users/upandrunningdesign/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/edit-shortcode-to-open-pdf/#post-8889865)
 * Status: resolved