-
AuthorPosts
-
May 19, 2016 at 5:03 pm #635316
hi,
i use a icon with a link. I want that all links on this icon get a nofollow attribute.(see screenshot)
How can i manage this?best regards
Chris
May 19, 2016 at 5:29 pm #635341Hey Chris_85,
I think Yoast SEO plugin would be best to use for that.
Best regards,
AndyMay 26, 2016 at 10:41 am #638628and is there another solution with code :-)
cheers
Chris
May 27, 2016 at 1:20 pm #639264Hi,
Please enable the custom css class field: http://kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/ and edit your icons that you would like to have nofollow attribute and give them a custom CSS class and then add following code to Functions.php file in Appearance > Editor
function remove_title_attr(){ ?> <script> jQuery(window).load(function(){ jQuery('.your-custom-class a').attr('rel','nofollow'); }); </script> <?php } add_action('wp_footer', 'remove_title_attr');
Best regards,
YigitJune 1, 2016 at 11:07 am #641378Thanks Yigit for this very good solution!
Is it possible to specify more css-classes in this script for example:
function remove_title_attr(){ ?> <script> jQuery(window).load(function(){ jQuery('.your-custom-class a', '.your-custom-class2 a' ).attr('rel','nofollow'); }); </script> <?php } add_action('wp_footer', 'remove_title_attr');
Cheers Chris
June 1, 2016 at 2:31 pm #641516Hey!
You can simply use “your-custom-class” on any element you would like to apply this changes. It does not have to be unique :)
Regards,
YigitJune 7, 2016 at 1:46 pm #644045Thanks Yigit,
but i use different classes for different changes. So my Question: can i use a Syntax like this
jQuery('.your-custom-class a', '.your-custom-class2 a' )
, to approach more than one class?
June 7, 2016 at 3:52 pm #644153Hi,
You can edit your elements and give them more than one custom CSS classes by adding them into custom CSS field as “your-custom-class your-custom-class-two” etc.
Best regards,
YigitJune 8, 2016 at 11:26 am #644707Hey Yigit,
i use your custom code in my function.php:
function remove_title_attr(){ ?> <script> jQuery(window).load(function(){ jQuery('.av-icon-char a').attr('rel','nofollow'); }); </script> <?php } add_action('wp_footer', 'remove_title_attr'); ?>
But when i look on my website at the facebook-icon on the bottom of the site the link did not have an nofollow attribute…Take a look: http://www.hochzeitshaus-leipzig.de/
any ideas?
cheers Chris
June 9, 2016 at 11:59 am #645387Hi,
The selector “.av-icon-char a” is incorrect. It should be “.av-icon-char”. Turn on the custom css class so that you can specify a unique selector for each elements: http://kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/
Best regards,
IsmaelJune 10, 2016 at 3:55 pm #646255also with this selector “.av-icon-char” it doesnt work. I also tryed the unique selector and it also didnt put the lnik on nofollow…any ideas?
beste regards
Chris
June 14, 2016 at 3:28 pm #648051Hi,
Can you please try following
function remove_title_attr(){ ?> <script> jQuery(window).load(function(){ jQuery('a.av-icon-char').attr('rel','nofollow'); }); </script> <?php } add_action('wp_footer', 'remove_title_attr'); ?>
Best regards,
YigitJune 15, 2016 at 8:07 am #648456Thanky Yigit for your suggestion…but the code has no effect to the icon link…it is still without “nofollow”…any other ideas?
best regards
Chris
- This reply was modified 8 years, 5 months ago by Chris_85.
June 15, 2016 at 10:59 am #648530Hi,
Please post us your login credentials (in the “private data” field), so we can take a look at your backend.
Login credentials include:
- The URL to the login screen.
- A valid username (with full administration capabilities).
- As well as a password for that username.
- permission to deactivate plugins if necessary.
Best regards,
YigitJune 15, 2016 at 12:03 pm #648546ok.. look in the private section…
Thanks
June 15, 2016 at 2:40 pm #648609Hi!
Can you please post FTP logins here privately as well? I made a small typo in functions.php file. I am very sorry for the inconvenience
Regards,
YigitJune 15, 2016 at 4:14 pm #648691hi,
no worries…
look to private section
June 15, 2016 at 5:37 pm #648777Hi,
I turned off “JavaScript Code optimieren?” in Autoptimize and it is working fine now. Please review your website now
Best regards,
YigitJune 16, 2016 at 7:55 am #649058Hello Yigit,
sorry that was my mistake with that Plugin! Thnaks for your help! Great Support here! Thanks!
-
AuthorPosts
- The topic ‘icon with NOFOLLOW Link?’ is closed to new replies.