Tagged: ,

Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #914164

    Hello, I want to add a nofollow in some buttons (the ones ghat go to contact page), how can I do it? I have seen some questions about this but I dont understand the way to do it.
    Thank you

    #914413

    Hey carmen,

    Can you try the solution posted here: https://kriesi.at/support/topic/how-to-set-nofollow-for-button-links/
    Hope this helps :)

    Best regards,
    Nikko

    #922987

    Just looking for the same thing, but can’t find an acceptable solution on the forum. I’m not going to change core Enfold files, and running an extra script for something so simple on each page load is silly.

    ALL of the other page builders have had this for years. We need to nofollow affiliate links. I have to resort to creating a button with my own CSS because of this…

    All it would require is adding a tick box on the Button settings page, please add it in the next release!

    Thanks,
    Tom

    • This reply was modified 6 years, 9 months ago by fisherman.
    #923038

    Hi Tom,

    Thank you for your feedback.

    You can request a feature here.

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #1076052

    Hi

    Is this still the solution as mentioned above, please?

    Thanks

    #1076646

    Hi info224,

    It should still be working yes, did you try it out and did you have any luck with it?

    Best regards,
    Rikard

    #1077444

    Hi

    Unfortunately not I don’t think it has worked. The page details are below.

    I added the following to the child php file and I added missy to each of the buttons via custom CSS class

    function remove_title_attr(){
    ?>
    <script>
    jQuery(window).load(function(){
    jQuery(‘.missy’).attr(‘rel’,’nofollow’);
    });
    </script>
    <?php
    }
    add_action(‘wp_footer’, ‘remove_title_attr’);

    #1078104

    Hi,

    Please try this instead:

    function remove_title_attr(){
    ?>
    <script>
    jQuery(window).load(function(){
    jQuery('.missy a').attr('rel','nofollow');
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'remove_title_attr');

    Best regards,
    Rikard

    #1107170

    Some times I don’t understand moderators and the knowledge that they have. Sorry for this comment but is true, a lot of times your solutions aren’t the good ones or simply no solution for some simple think. Maybe your support team isn’t telling you the good answers.

    The javascript solution isn’t a good one because “nofollow” is just to tell google that the link doesn’t need to follow and index and google bot knows when some attributes are added via javascript and drop a little bit in search points because isn’t good practice.

    Enfold have ‘nofollow’ for button links by default, but is deactivated. You only need to add:

    
    add_theme_support('avia_rel_nofollow_for_links');
    

    to functions.php and the option appear in Open Link in new Window? selector.

    A little bit of deep code navigation in av_button shortcode file shows me the solution.

    Enjoy

    #1107205

    Hey Victor,

    Thank you for sharing!

    Best regards,
    Jordan Shannon

    #1107958

    thanks :)

    #1107990

    my code for that to add to all external links is for child-theme funtions.php:

    add_action('wp_footer', 'open_external_links_in_newtab');
    function open_external_links_in_newtab(){
    ?>
    <script type="text/javascript">
    (function($) {
      var url = window.location.origin;
      $('a').not('a[href*="'+url+'"], a[href*="mailto:"], a[href*="#"], a[href*="tel:"], a[href*="javascript:;"] ').attr({
        'target':'_blank',
        'rel': 'nofollow noreferrer',
      })
    })(jQuery);
    </script>
    <?php
    }
    

    the javascript is excluded because im obfuscating e-mail adresses via javascript encryption

    #1107998

    @guenni: A “nofollow” for pagerank sculpting set by javascript won’t work for searchengine-bots … and those are the only ones i can think of why you ‘could would want’ a “nofollow” …
    Google bot is able to interpret some javascript content, i know … but i doubt the bot will execute javascript to spider links.

    #1108088

    and is there another method that will bring us a solution afterwards now?
    allthough it is in the DOM it does not work ?

    #1108102

    Still Javascript. All methods involve javascript are bad practice and google bot penalises.

    Regards,

    #1108256

    @guenni: It’s not in the source before javascript is executed. If you watch the code in the browser developer tools it will show … but not if you just ‘right klick > show html source’. And a bot (for link detection) will not run the javascript.
    Options i can think of at the moment:
    1. set the nofollow manually in text-mode of the editor
    2. parse the whole html-output with a function and reg-exp external links
    But i myself don’t search for a solution … in my opinion “nofollow-sculpting” isn’t something needed at all and doesn’t do anything … just some pseudo-seo from 10 years ago …

    #1108806

    Hi,

    @cg / @fromcouch: Thanks for the reply. It’s quite informative.

    Best regards,
    Ismael

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