WordPress.org

Forums

WP Instagram Widget
[resolved] Open in new window (2 posts)

  1. Richard van Denderen
    Member
    Posted 1 year ago #

    Would be a nice option /default to have.
    I now altered the code a bit to make the links open in a new tab/window.

    wp-instagram-widget.php

    line 116:

    echo '<li><a href="'.$image['link'].'" target="_blank"><img src="'.$image[$size]['url'].'"  alt="'.$image['description'].'" title="'.$image['description'].'"/></a></li>';

    and line 123:

    ><p class="clear"><a href="http://instagram.com/<?php echo trim($username); ?>" target="_blank"><?php echo $link; ?></a></p><?php

    https://wordpress.org/plugins/wp-instagram-widget/

  2. Scott (@scottsweb)
    Member
    Plugin Author

    Posted 1 year ago #

    I would recommend achieving this with JavaScript (within your theme) so that the plugin can be safely updated in future. Using jQuery it would be something along the lines of:

    jQuery(".null-instagram-feed a").attr("target","_blank");

    I will consider adding this as an option in future.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Instagram Widget
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic