This topic has 5 replies, 2 voices, and was last updated 8 years by Radu.

  • Author
  • #139438
     lifeact
    Participant

    Hi! What file i need correct for social networks in TOP was with nofollow tag?

    #139495
     Radu
    Moderator

    Hi,

    Add this function to wp-content/themes/kleo-child/functions.php

    COPY CODE
    
    
    /***************************************************
    :: Get social profiles
    ***************************************************/
    
    if (!function_exists('kleo_get_social_profiles')):
    
    	function kleo_get_social_profiles($args=false)
    	{
    		$output = '';
    		$icons = '';
    		$all_options = get_option("kleo_".KLEO_DOMAIN);
    		
    	    $defaults 	 = array(
    					'container'	=> 'ul',
    					'item_tag' => 'li',
    					'target' => '_blank'
    	    );
    		// Parse incomming $args into an array and merge it with $defaults
    		$args = wp_parse_args( $args, $defaults );
    		$args = apply_filters('kleo_get_social_profiles_args', $args);
    		
    		//get social data from theme options
    		if (!empty($all_options)) {
    			foreach ($all_options as $k => $opt)
    			{
    				if (substr( $k, 0, 7 ) === 'social_' && !empty($opt) ) {
    					$k = str_replace('social_','',$k);
    					$title = str_replace(
    							array('gplus', 'vimeo-squared', 'pinterest-circled', 'instagramm'), 
    							array('Google+', 'Vimeo','Pinterest', 'Instagram'), 
    							$k
    						);
    
    					$icons .= '<' . $args['item_tag'] . '>';
    					$icons .= '<a rel="nofollow" target="'.$args['target'].'" href="'.$opt.'"><i class="icon-'.$k.'"></i><div class="ts-text">'.ucfirst($title).'</div></a>';
    					$icons .= '</' . $args['item_tag'] . '>';
    				}
    			}
    		}
    		
    		$icons = apply_filters('kleo_get_social_profiles', $icons);
    		if ($icons != '') {
    			$output .= '<' . $args['container'] . ' class="kleo-social-icons">';
    			$output .= $icons;
    			$output .= '</' . $args['container'] . '>';
    		}
    		
    		return $output;
    		
    	}
        add_shortcode( 'kleo_social_icons', 'kleo_get_social_profiles' );
    
    endif;
    
    

    Will add no follow for all social icons

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Ticket solution
    #139549
     lifeact
    Participant

    add, but rel = “nofollow” not added in thise link – s

    #139675
     Radu
    Moderator

    Replace the code with the code frmo here : http://pastebin.com/raw/NPb1f7hf

    Let me know

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #139723
     lifeact
    Participant

    thanks, I edit thise ‘/lib/theme-functions.php’ file and now allright

    #139916
     Radu
    Moderator

    Ok,

    But on the theme update those will be reverted back and you should do the same operation

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 6 posts - 1 through 6 (of 6 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?