• Resolved crool

    (@crool)


    Is it it possible to add rel=”nofollow” to the link? Maybe by Filter and action hooks?
    I use the shortcode: (‘[pwb-all-brands per_page=”15″ image_size=”large” title_position=”none” hide_empty=”true”]’);

    So i want to add this to the link to

    Is there a way to add this?
    Please let me know,
    Crool

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter crool

    (@crool)

    Does anyone know?

    Plugin Contributor titodevera

    (@titodevera)

    Hi crool.

    Yes, you can filter the shortcode output.

    Add this to your functions.php:

    
    add_filter( 'do_shortcode_tag', 'pwb_custom_add_nofollow_to_links', 10, 4 );
    function pwb_custom_add_nofollow_to_links( $output, $tag, $attr, $m ){
    	if( $tag == 'pwb-all-brands' )
    		$output = str_replace('<a href="', '<a rel="nofollow" href="', $output);
    	return $output;
    }
    

    ??

    Thread Starter crool

    (@crool)

    thank you very much!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add add nofollow link to shortcode’ is closed to new replies.