Tagged: nofollow
-
AuthorPosts
-
October 27, 2021 at 10:56 am #1326640
Hello Support team,
How can I add the “nofollow” attribute to “internal links” on buttons AND images?
I need to ad it on 2 buttons and 6 images on the homepage.Thank you,
AB
October 27, 2021 at 1:39 pm #1326681Hey AB,
Thanks for contacting us!
Please edit your Button element and go to Links Settings > Open in new window and choose to use “nofollow” – https://imgur.com/a/S56Ozym
You can find the option in Advanced > Link Settings > Open in new window for Image element after setting image link to “Set manually” :)Best regards,
YigitOctober 28, 2021 at 9:42 am #1326775Hello Yigit,
I tried to do so and also tried to change the Enfold theme options, but I can’t see this drop down.
The buttons are on the “easy slider”, does this make a difference? but I tried also to activate the “nofollow” on a normal button, but it is not working nor on the image element. I’m using the latest Enfoldversion 4.8.6.3
Can you check this, please?
Best regards,
AB
October 28, 2021 at 12:59 pm #1326824Hi,
Thank you for the update.
You have to enable the Enfold > SEO Support > Support ALB Elements To Qualify Links option in order to see those options. Please make sure that the site contains the latest version (4.8.7) of the theme.
Best regards,
IsmaelOctober 28, 2021 at 2:46 pm #1326852Hi Ismael,
Works perfectly, also with the version 4.8.6.3
Thank youu,
ABOctober 29, 2021 at 5:07 am #1326912Hi,
Great, I’m glad that you got it working. Please let us know if you should need any further help on the topic or if we can close it.
Best regards,
RikardJuly 3, 2022 at 10:18 am #1357115Hi,
I’m hoping this is the correct place for me to post, please correct me if I’m wrong.
I’m using Enfold theme version 4.6.3.1 alongside a child theme of Enfold (tried updating to 5.0 but it breaks my website for some reason)
Is there any code I can add to get the “nofollow” attribute to outbound button links?
July 3, 2022 at 1:32 pm #1357126Hi,
Thanks for your question, but we don’t have a built-in way to do this but you can try adding this javascript to the end of your child theme functions.php file in Appearance ▸ Editor:function add_nofollow_to_external_links() { ?> <script> function myFunction() { var x = document.getElementsByTagName("a"); var i; for (i = 0; i < x.length; i++) { if (location.hostname!=x[i].hostname){ x[i].rel = "nofollow"; x[i].target = "_blank"; x[i].title = "Click to open in new window"; }}} mft=setTimeout("myFunction()",0); function LoadEvent(func){ var oldonload = window.onload; if (typeof window.onload != 'function'){ window.onload = func; } else{ window.onload = function() { if(oldonload) {oldonload();} func();}}} LoadEvent(function(){ myFunction(); }); </script> <?php } add_action('wp_footer', 'add_nofollow_to_external_links');
In my test this works with buttons, images and text links
Source: How To Make All External Links No-follow Using JavaScriptBest regards,
MikeJuly 4, 2022 at 9:31 am #1357176Thank you Mike, I will give that a try, much appreciated.
Best wishes,
Chris
July 4, 2022 at 1:03 pm #1357196 -
AuthorPosts
- You must be logged in to reply to this topic.