• Resolved scottphelps

    (@scottphelps)


    When adding a hot spot and choosing to link to another website when someone clicks that hot spot, is there a way to make those links “nofollow”?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author croixhaug

    (@croixhaug)

    Hi @scottphelps I don’t think we actually have a way to do that now but it’s a good idea and I can try adding a PHP filter to allow it in an upcoming release. Would you want that for every link or only certain ones?

    Thanks,
    Nathan

    Thread Starter scottphelps

    (@scottphelps)

    I would want to be able to choose whether a link is nofollow or not. For affiliate links, we need them to be nofollow.

    Plugin Author croixhaug

    (@croixhaug)

    Hi @scottphelps we added some extra code to Draw Attention v1.9.15 which lets you customize the no follow attribute with some extra code. Please update to v.1.9.15 and add this code to your functions.php file:

    add_filter( 'da_render_hotspots', 'da_set_urls_to_nofollow', 10, 2 );
    function da_set_urls_to_nofollow( $hotspots, $image_id ) {
    	foreach ($hotspots as &$hotspot) {
    		if ( empty( $hotspot['rel'] ) ) {
    			$hotspot['rel'] = '';
    		}
    		$hotspot['rel'] .= ' nofollow';
    		$hotspot['rel'] = trim( $hotspot['rel'] );
    	}
    	
    	return $hotspots;
    }

    If you email our pro support at [email protected], we can share this code as an add-on plugin you can install too if you prefer not to modify your functions.php file.

    Thanks,
    Nathan

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘No Follow links’ is closed to new replies.