Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Scott (@scottsweb)

    (@scottsweb)

    There are no filters for this but you can create a custom template part in your theme that does this.

    Open up your theme and create a folder called parts. Within that create a file called wp-instagram-widget.php. Then add the following code:

    echo '<li class="'. $liclass .'"><a href="https://mylink.com" target="'. esc_attr( $target ) .'" class="'. $aclass .'"><img src="'. esc_url( $item[$size] ) .'" alt="'. esc_attr( $item['description'] ) .'" title="'. esc_attr( $item['description'] ).'" class="'. $imgclass .'"/></a></li>';

    That should do it!

    Thread Starter Halyra

    (@harasse)

    Thank you for your prompt reply.
    As I dont want to be be dependent of themes and not include my additionnal files, I finally choose to insert a small JS script in the wp_footer hook of my customizing plugin :
    var link = document.querySelectorAll(“.instagram-pics a”);
    for (var i = 0; i < link.length; i++) {
    link[i].setAttribute(‘href’, ‘my-new-link’);
    }
    It seems OK.
    Thanks for your help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How changing link of thumbnail’ is closed to new replies.