Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #1141054

    Not able to add rel=’nofollow’ attribute in outgoing links

    I have added this script in function.php file
    function add_custom_script(){
    ?>
    <script>
    jQuery(window).load(function(){
    jQuery(“.rel-nofollow a”).attr(“rel”, “nofollow”);
    });
    </script>
    <?php
    }
    add_action(‘wp_footer’, ‘add_custom_script’);

    but it is not working and not adding rel=’nofollow’ attribute
    at the same time it is showing below error in console
    Uncaught ReferenceError: jQuery is not defined
    at (index):408

    I am using latest version 4.6.2

    #1141360

    Hey subrakavi,

    Please post us your login credentials (in the “private data” field), so we can take a look at your backend.

    1. Install and activate ” Temporary Login Without Password “.
    2. Go to ” Users > Temporary Logins ” on the left-side menu.
    3. Click ” Create New “.
    4. Add the email address for the account ( you can use (Email address hidden if logged out) ), as well as the ” Role ” making that the highest possible and the expiry about four days
      ( do be sure that we have enough time to debug ).
    5. Click ” Submit “.
    6. You’ll now have a temporary account. Please provide us here in the private section the URL, so we can login and help you out.

    When your issue is fixed, you can always remove the plugin!
    If you prefer to not use the plugin, you can manually create an admin user and post the login credentials in the “private data” field.

    Best regards,
    Nikko

    #1142178
    This reply has been marked as private.
    #1142540

    Hi subrakavi,

    Thanks for giving us admin access, first since you want to add some customization we suggest using a child theme first: https://kriesi.at/documentation/enfold/child-theme/
    Without a child theme, once you update Enfold all of you modifications will be lost.
    Next, I noticed that you don’t have a class rel-nofollow in the said page.
    Please follow the instructions Yigit posted here: https://kriesi.at/support/topic/add-relnofollow-on-button-links/#post-276198
    Let us know if you’ll need assistance on some instructions.

    Best regards,
    Nikko

    #1142569
    This reply has been marked as private.
    #1142582

    ;). sometimes the description belongs to the solution as well as the given code.

    In the solutions I offer here from time to time there is often something about : set the custom-class : abc etc. pp.
    This will be overlooked in general.

    this here was my solution – but someone here on board (cg) told me that a jQuery insertion of these attributes has no effect on bots…etc. (and the reasoning immediately made sense to me.)
    https://kriesi.at/support/topic/enfold-button-nofollow-shortcode/#post-1108256

    #1142586
    This reply has been marked as private.
    #1142587

    I don’t want to add the nofollow attribute to the outgoing links through jquery, instead I want to do it manually in every link, please tell me how i can do it. As i have tried adding the no follow attribute in the button shortcodes, but it is not working.

    #1142604

    on next update ( the 4.6.2. beta) has this feature allready on external links the rel noopener and noreferrer are added – that makes sense
    the nofollow ? does it make sense

    read here for example: https://searchenginelaws.com/seo/what-is-rel-noopener-noreferrer-tag/
    Links made ineffective with rel=”nofollow” do not help to improve the search engine ranking of the target page. Pagerank is also not inherited.
    and:

    #1142639

    the same thing we are saying, that we don’t want the script method, it is not good for site seo, we want to add rel=nofollow manually, noopener and noreferrer is something else, moderator pls guide us

    #1142696

    The link provided – and the answer here: Link
    does not belong to javascript.

    it’s an assessment of whether a nofollow makes sense from both perspectives.
    Google and other (there are still some) search engines consider only noopener and noreferrer rels as advisable.
    Who wishes good SEO rankings, should probably want to profit from the links to good other sites – right?
    Therefore please explain to me what the benefit of a rel nofollow is.
    I always like to learn.

    #1142704
    This reply has been marked as private.
    #1142797

    Hi subrakavi,

    After reading the other thread as mentioned by @Guenni007 it does make sense not to use jquery to add rel=’nofollow’.
    Please add this php code in your functions.php:

    add_theme_support('avia_rel_nofollow_for_links');

    you should have this option to add rel=’nofollow’ in your button.
    Here’s a screenshot: https://imgur.com/9P6Xf8P


    @Guenni007
    thanks for helping out :)

    Best regards,
    Nikko

    #1142954
    This reply has been marked as private.
    #1142957

    Problem solved – we have to add this code in the shortcode
    link_target=’_blank nofollow’

    Thankyou

    #1143059

    Hi subrakavi,

    We’re glad to hear that :)
    Let us know if you need further assistance.

    Best regards,
    Nikko

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