Tagged: rel="nofollow"
-
AuthorPosts
-
September 23, 2019 at 4:43 pm #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):408I am using latest version 4.6.2
September 24, 2019 at 12:09 pm #1141360Hey subrakavi,
Please post us your login credentials (in the “private data” field), so we can take a look at your backend.
- Install and activate ” Temporary Login Without Password “.
- Go to ” Users > Temporary Logins ” on the left-side menu.
- Click ” Create New “.
- 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 ). - Click ” Submit “.
- 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,
NikkoSeptember 26, 2019 at 10:20 am #1142178This reply has been marked as private.September 27, 2019 at 2:44 am #1142540Hi 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,
NikkoSeptember 27, 2019 at 5:47 am #1142569This reply has been marked as private.September 27, 2019 at 7:14 am #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-1108256September 27, 2019 at 7:50 am #1142586This reply has been marked as private.September 27, 2019 at 7:51 am #1142587I 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.
September 27, 2019 at 9:14 am #1142604on 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 senseread 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:
September 27, 2019 at 10:19 am #1142639the 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
September 27, 2019 at 11:39 am #1142696The 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.September 27, 2019 at 11:50 am #1142704This reply has been marked as private.September 27, 2019 at 4:24 pm #1142797Hi 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,
NikkoSeptember 28, 2019 at 6:24 am #1142954This reply has been marked as private.September 28, 2019 at 6:58 am #1142957Problem solved – we have to add this code in the shortcode
link_target=’_blank nofollow’Thankyou
September 29, 2019 at 4:45 am #1143059Hi subrakavi,
We’re glad to hear that :)
Let us know if you need further assistance.Best regards,
Nikko -
AuthorPosts
- You must be logged in to reply to this topic.