WordPress.org

Ready to get started?Download WordPress

Forums

Pinterest "Pin It" Button
[resolved] New window (4 posts)

  1. awilson3rd
    Member
    Posted 3 months ago #

    Hello,

    I have installed the latest version of the plugin and was hoping there would be something in the shortcode to allow me to set the pinit window open in a new tab or new window?

    Is this possible?

    Thanks

    Andrew

    https://wordpress.org/plugins/pinterest-pin-it-button/

  2. Phil Derksen
    Member
    Plugin Author

    Posted 2 months ago #

    Hi Andrew -- Right now this plugin is just using the same functionality for popups that Pinterest's own embed code, bookmarklet and browser extensions use.

    If you're familiar with WordPress filters and/or HTML & JS, you could disable the pinit.js file that runs, which I believe would cause each link to just open a new window, maybe adding a target="_blank" attribute to each link tag as well.

    /**
     * Hooked to the wp_print_scripts action, with a late priority (100),
     * so that it is after the script was enqueued.
     */
    function wp_dequeue_pinit_script() {
       wp_dequeue_script( 'pinterest-pinit-js' );
    }
    add_action( 'wp_print_scripts', 'wp_dequeue_pinit_script', 100 );

    Note I did not test this but modified from http://codex.wordpress.org/Function_Reference/wp_dequeue_script

  3. awilson3rd
    Member
    Posted 2 months ago #

    Hello Phil,

    Thanks for the reply.

    I did try the target blank but this had no effect.

    I found this while searching for an answer, is this something that could be applied to this plugin too, might be easier to edit the plugin php files?

    http://wordpress.org/support/topic/plugin-pinterest-pinboard-widget-open-pins-in-new-window

    Thanks

    Andrew

  4. Phil Derksen
    Member
    Plugin Author

    Posted 2 months ago #

    We will look into that for an upcoming release. Thank you!

Reply

You must log in to post.

About this Plugin

About this Topic