• Resolved boulderbrian

    (@boulderbrian)


    I used the shortcode [downloads category=”pdf”] and it works fine display a list of all the pdfs available for download. The only issue is that they open in the existing window. I would like them to open in a new window (target=”_blank”). Does anyone know how to accomplish this?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hey @boulderbrian ,

    It’s possible to accomplish what you desire if you override the default template( documentation here ) and add target="_blank" to the a HTML element.

    Hope this helps, and if you have any other questions please don’t hesitate to ask us.

    Warmly,
    Razvan

    Thread Starter boulderbrian

    (@boulderbrian)

    Thank you! That worked for setting a target window. I used the template content-download-title.php to create my new template. The only issue is that now I am seeing the Download count after the title even though I have it set to show Download Title only. Do you know how I can remove the download count?

    Hey @boulderbrian ,

    If you are using & overriding the content-download-title.php it should not show the counts. Could you please provide a link to have a look & also could you please show the contents of the overriding template?

    Warmly,
    Razvan

    Thread Starter boulderbrian

    (@boulderbrian)

    I’m not sure if I am using the correct shortcode. In my theme Spectra, I have a folder download-monitor with the template spectra.php that is a copy of the content-download-title.php file with the addition of target=”_blank”

    [downloads category=”white paper” per_page=”8″ template=”spectra”]

    And it is showing the number of downloads – https://ibb.co/TYCtq13

    If I edit the content-download-title.php file directly adding target it works as expected without showing the number of downloads.

    Please advise. Thanks!
    -Brian

    Hey @boulderbrian ,

    Could you please rename your template to content-download-spectra.php and see if this works?

    Warmly,
    Razvan

    Thread Starter boulderbrian

    (@boulderbrian)

    That worked!

    Thanks,
    -Brian

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Download pdf in new browser window’ is closed to new replies.