-
Author
-
October 13, 2016 at 14:42 #139438lifeactParticipant
Hi! What file i need correct for social networks in TOP was with nofollow tag?
October 13, 2016 at 19:24 #139495RaduModeratorHi,
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 solutionOctober 13, 2016 at 21:18 #139549lifeactParticipantadd, but rel = “nofollow” not added in thise link –
October 14, 2016 at 18:54 #139675RaduModeratorReplace 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 solutionOctober 14, 2016 at 20:29 #139723lifeactParticipantthanks, I edit thise ‘/lib/theme-functions.php’ file and now allright
October 17, 2016 at 14:13 #139916RaduModeratorOk,
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 -
AuthorPosts
Viewing 6 posts - 1 through 6 (of 6 total)
The forum ‘General questions’ is closed to new topics and replies.