• Resolved yessirmr

    (@yessirmr)


    Hello,

    Great plugin but I am stuck. I have the below code

    [mla_gallery size=icon post_mime_type=application/pdf post_parent=all link=file size=medium]
    mla_caption='<a href="{+file_url+}" target="_blank" rel="noreferrer noopener">{+title+}</a>'
    [/mla_gallery]

    The caption is correct, it is a link that opens in new tab and has a rel attribute.
    How can I achieve the same on the media. Now when I click on the media it opens in the same tab, and doesn’t have the rel attribute.

    Thank you in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for your question and for including the full text of your shortcode; very helpful.

    You can use two of the [mla_gallery] parameters to add these attributes to the links around each thumbnail. Here is a shortcode that is working well on my system:

    [mla_gallery size=icon post_mime_type=application/pdf post_parent=all link=file size=medium]
    mla_target="_blank"
    mla_link_attributes='rel="noreferrer noopener"'
    mla_caption='<a href="{+file_url+}" target="_blank" rel="noreferrer noopener">{+title+}</a>'
    [/mla_gallery]

    Note the use of single quotes around the mla_link_attributes value, so the attribute can be surrounded by double quotes.

    I hope that gives you what you need for your application. I am marking this topic resolved, but please update it if you have problems or further questions regarding the above solution. Thanks for your interest in the plugin.

    Thread Starter yessirmr

    (@yessirmr)

    Thank you! Works perfectly!

    Will send a donation today, to support your work!

    Plugin Author David Lingren

    (@dglingren)

    Thanks for confirming that the suggested solution works for you, and thanks especially for the donation to our fund at the ALS Network.

    Donations, good reviews and positive feedback in the support forum are great motivators to keep working on the plugin and supporting its users. I really appreciate your interest in the plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.