• Resolved upandrunningdesign

    (@upandrunningdesign)


    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

    (@dglingren)

    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.
    Thread Starter upandrunningdesign

    (@upandrunningdesign)

    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.