Tagged: ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #373479

    Hi all,

    I am looking for a way to have the hotspot links open in a new window/tab.
    Any idea how this can be achieved? Maybe with a childtheme function?

    Any help appreciated.

    Kind regards,
    Thomas

    • This topic was modified 9 years, 3 months ago by borkent.
    #373482

    Hey Thomas!

    Can you post the link to your website please?

    Best regards,
    Yigit

    #373484

    Hiya Yigit,

    Still in development, running local with xampp.
    Just want to know how to make hotspots with an external link, link in new window…

    Cheers,
    Thomas

    #373486

    Hey!

    Please add following code to Functions.php file in Appearance > Editor

    function add_custom_target(){
    ?>
    <script>
    jQuery(window).load(function(){
    jQuery('.av-image-hotspot a').attr('target','_blank');
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_target');

    Regards,
    Yigit

    #373500

    and thats why enfold is the best theme in the world!

    thx, works like a charm, added an #id to it so it only happens on that specific hotspot image!

    kind regards,
    Thomas

    #373505

    Hey!

    Great! Glad we could help Thomas. Let us know if you have any other questions or issues. Happy new year :)

    Regards,
    Yigit

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Image with hotspots link target to _blank?’ is closed to new replies.