Code

Can i add extra attributes to hotspot links?

« See all FAQs for WordPress Tooltips Ultimate & Image Hotspot

Can i add extra attributes to hotspot links?

Yes you can. Insert the code below in your functions.php and customize it to your needs. In this example we add target=”_blank” rel=”noopener noreferrer nofollow” to all links attached to tooltip style 133.

add_filter('wpcmtt_hotspot_link_atts', 'wpcmtt_hotspot_link_atts_custom', 10, 2);

function wpcmtt_hotspot_link_atts_custom($atts, $hotspot_tooltip) {
    // Apply this only for links attached to a certain tooltip style 
    if($hotspot_tooltip["wpcmtt_hotspot_points_meta_style"] == "133"){
            return 'target="_blank" rel="noopener noreferrer nofollow"';
    }
    return $atts;
}
by
by
by
by
by
by

Tell us what you think!

We'd like to ask you a few questions to help improve CodeCanyon.

Sure, take me to the survey