open new browser window in shortcode

in Download Manager Free

Viewing 4 posts - 1 through 4 (of 4 total)
Jun 22, 2020 at 4:42 pm
#131228
Participant
Deborah Bulling
OP

Hi,

I need to have a new browser window open when someone clicks to download/view a file. I can’t find anywhere in the documentation that addresses how to write the shortcode for that. It is currently opening the download or view in the current window but the link for the download takes the user to another site and then the open tab for my site is replaced with the new site window. Can you please point me in the right direction to implement that functionality?

Jun 23, 2020 at 7:03 am
#131255
Moderator
Nayeem Riddhi
Staff

which shortcode do you want to try to do this? let me know.

Thanks.

Jun 23, 2020 at 2:12 pm
#131293
Participant
Deborah Bulling
OP

I’m adding the downloads to my page using the standard shortcode that only has the item ID in it. I would like to be able to ask the browser to open the pdf/download in a new browser window since many of the links we are opening are not on my website. I basically want the target=”_blank” functionality. I assume the best way to do that is with the shortcode. I don’t see any general settings for the plugin that would allow that.

Please advise how I can make this happen.

Jun 23, 2020 at 2:15 pm
#131294
Moderator
Nayeem Riddhi
Staff

Hi,

you can try and follow the link below documentation,

Template Files

by default, you are using link-template-default.php for link template and page-template-default.php for the page template. As documentation, you have to copy the file in the theme directory naming a folder called download-manager, then paste it in page-templates for page template or link-templates for link template. And you have to replace [download_link] with <a href="[download_url]" class="btn btn-primary" target="_blank">[link_label]</a> in related PHP file.

let me know, if those help you.

Thanks.

Viewing 4 posts - 1 through 4 (of 4 total)

The topic "open new browser window in shortcode" is closed to new replies.