WordPress.org

Ready to get started?Download WordPress

Forums

Custom Post Type UI
[resolved] Open pdfs in new tab (6 posts)

  1. lejaco
    Member
    Posted 1 year ago #

    Hi,

    I have a 'post type' called downloads. The files that are uploaded to the downloads post type are pdfs. I would like to have these pdfs open in a new tab once they are clicked on, as opposed to opening in the current page.

    Is this possible?

    Cheers
    Jaco

    http://wordpress.org/extend/plugins/custom-post-type-ui/

  2. lejaco
    Member
    Posted 1 year ago #

    For reference, this is the page: http://www.hysasystems.org/?page_id=1081

  3. lejaco
    Member
    Posted 1 year ago #

    Anyone able to help?

  4. tobe82
    Member
    Posted 1 year ago #

    You just need to add target="_blank" to the a tags that link to the PDFs.

    How are you generating the list of PDFs?

  5. lejaco
    Member
    Posted 1 year ago #

    The links are being created dynamically through a query. If i add the target="_blank" to the the 'a' tags it doesn't seem to work. I've inherited the site from a previous developer and my php skills are limited.

    the downloads.php file is here if you have a moment to check it out:
    https://dl.dropbox.com/u/15136767/downloads.php

    Thanks for any advice...
    J

  6. Michael Beckwith
    Member
    Plugin Author

    Posted 1 year ago #

    Not really related to the UI plugin itself, but the target="_blank" part should work. Another idea would be to see if you can force the browser to download the file instead of view in-browser.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.