• I am running a self hosted site and Jetpack. Set up Twitter widget and it is woking however I want the option to target blank rather than same page for links in the twitter feed. I thought this was an option but don’t see any button to select in configuration.

    Really want to use this plugin but without the target blank option I can’t; don’t want to lose visitiors.

    Any help appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter speedmetalarmy

    (@speedmetalarmy)

    Any word? I need the “target blank” option in order to use the widget

    same problem here …
    is there a wishlist to put this on?

    The only way that I found to make them open in new windows is to edit the PHP file.

    It is in “jetpack -> modules -> widgets -> twitter-widget.php”

    On line 151 and line 170 you can add target=”_blank” to the links. It doesn’t seem to break the code and the links work for me.

    Here’s an example on line 151:

    $expanded = '<a href="' . esc_url( $entity_url['expanded_url'] ) . '" target="_blank"> ' . esc_html( $entity_url['display_url'] ) . '</a>';

    Line 170:

    echo "<li>{$before_tweet}{$text}{$before_timesince}<a href=\"" . esc_url( "http://twitter.com/{$account}/statuses/{$tweet_id}" ) . '" class="timesince" target="_blank">' . str_replace( ' ', '&nbsp;', wpcom_time_since( strtotime( $created_at ) ) ) . "&nbsp;ago</a></li>\n";
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Jet Pack Twitter Widget : target blank option ?’ is closed to new replies.