Tagged: 

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #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

    #1326681

    Hey 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,
    Yigit

    #1326775

    Hello 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

    #1326824

    Hi,

    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,
    Ismael

    #1326852

    Hi Ismael,

    Works perfectly, also with the version 4.8.6.3

    Thank youu,
    AB

    #1326912

    Hi,

    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,
    Rikard

    #1357115

    Hi,

    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?

    #1357126

    Hi,
    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 JavaScript

    Best regards,
    Mike

    #1357176

    Thank you Mike, I will give that a try, much appreciated.

    Best wishes,

    Chris

    #1357196

    Hi,
    Very good, we will leave this open to hear back from you.

    Best regards,
    Mike

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.