Support » Plugin: WP Publication Archive » Open docs in new window

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Eric Mann


    I noticed that opening docs in a new window was not included in the recent 2.5.3 release.

    Noticed … where?

    The entire point of the 2.5.X branch was to allow users to click to open publications rather than just clicking to download. How are you using the plugin? Can you provide a link so I can see any issues you might be having?

    The new default behavior as of version 2.5 is to open rather than download publications, so I’m not sure what issue you’re facing.

    We’re running 2.5.3. The site is still in development, I’ll have to check with the client before I can post a link.

    We’re simply using the shortcode with a category to list certain documents on a page. However, what I see on the page where the docs are listed is this:

    Open | Download

    Clicking the “Open” link opens the document (if it’s a PDF) right in that window, in Chrome, Firefox and IE. Clicking “Download”, in Firefox and Chrome, will open the document in a new window/tab. IE asks what you want to do with it.

    It’s the “Open” link behaviour that we would like to have go to a new window/tab and not leave the underlying page.

    Plugin Author Eric Mann


    OK, that is the expected behavior. I cannot predict what browser people are using, so clicking the Open link will stream the document to the browser and defers to the browser for what to do with it.

    I’m adding a hook in version 2.5.5 that will allow you to force the open link to use a new window. Upgrade to version 2.5.5, then add the following to your theme:

    add_filter( 'wp_pubarch_open_in_blank', '__return_true' );

    OK, I’ll pass that back on. Thanks.

    Something else that might be useful is to add some span and/or classes around the Open and Download. That way we can better target CSS to each link if we need to.

    If there had been something there to target, I may have just hidden the “Open” link altogether.

    Thanks for the prompt reply Eric. It’s been a good plugin for us.

    Hi – Love this module

    Just on opening new page
    Upgrade to version 2.5.5, then add the following to your theme:

    add_filter( ‘wp_pubarch_open_in_blank’, ‘__return_true’ );

    sorry to be a dummy – what file is this added to and where?


    add that to your theme’s functions.php file


    thanks so much


    Plugin Author Eric Mann


    @web1 And next time, please open a new thread. Once these are marked as “resolved” I don’t always see them to drop back by to help.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Open docs in new window’ is closed to new replies.