How Open the [file_list] documents in new tab ?

Viewing 6 posts - 1 through 6 (of 6 total)
#158373

Arnaud Dumonceau
Participant

We using the download manager and put the shortocde [file_list] in the template.
We have a download button to donwload the Zip file (this link open in a new tab with that code :
<div class=”btn btn-primary” align=”right”>
[link_label]</div>

The problem is I need to open also a new tab when i click to download buttons of “file list”.
We try to open in new tab the [file_list] buttons documents, but it’s open always in the same tab.

Can you help us ?

Thx

#158376

Humayon
Spectator

Hello @rno,
Hope you are well.
Please add the following code before the </body> in footer.php in your theme directory.

<script>
jQuery(function($){
    $('.inddl.btn').each(function(){
         $(this).attr('target','_blank');
    });
});
</script>

I hope it will solve your issue.
With Regards

#158380

Arnaud Dumonceau
Participant

I use “Compact theme” and i have only : breadcrumb.php, compact.php, content.php, header.php, sidebar.php.
I’ve not any “footer.php” !

Issue for me please ?

#158382

Humayon
Spectator

Hello @rno,
In that case you can use this plugin or you can contact with your theme support about implementing that custom code.
Thank you.

#158388

Arnaud Dumonceau
Participant

i didn’t understand. I tought you talk about the wpdm theme “Compact” for archive page. Forget it.
Ok, so i put your code in my footer.php theme but it change nothing, the [file_list] download buttons always open in the same tab …

Any other issue ?

#158418

Humayon
Spectator

Hi @rno,
In that case, provide us with your temporary wp-admin login details and admin URL in a private reply for checking the issue.
Also, please share the related page/file/package URL with us where the issue exists.
Thank you

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

The topic ‘How Open the [file_list] documents in new tab ?’ is closed to new replies.