open new browser window in shortcode

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

Deborah Bulling
Participant

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?

#131255

Nayeem Riddhi
Moderator

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

Thanks.

#131293

Deborah Bulling
Participant

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.

#131294

Nayeem Riddhi
Moderator

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.