-
AuthorPosts
-
February 19, 2018 at 8:52 am #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 youFebruary 19, 2018 at 5:46 pm #914413Hey 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,
NikkoMarch 7, 2018 at 1:39 pm #922987Just 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.
March 7, 2018 at 2:52 pm #923038Hi Tom,
Thank you for your feedback.
You can request a feature here.
If you need further assistance please let us know.
Best regards,
VictoriaMarch 7, 2019 at 5:19 pm #1076052Hi
Is this still the solution as mentioned above, please?
Thanks
March 9, 2019 at 8:51 am #1076646Hi info224,
It should still be working yes, did you try it out and did you have any luck with it?
Best regards,
RikardMarch 11, 2019 at 6:59 pm #1077444Hi
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’);March 13, 2019 at 7:36 am #1078104Hi,
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,
RikardJune 4, 2019 at 4:38 pm #1107170Some 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
June 4, 2019 at 6:25 pm #1107205Hey Victor,
Thank you for sharing!
Best regards,
Jordan ShannonJune 6, 2019 at 3:06 pm #1107958thanks :)
June 6, 2019 at 4:39 pm #1107990my 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
June 6, 2019 at 5:00 pm #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.June 6, 2019 at 10:29 pm #1108088June 6, 2019 at 11:21 pm #1108102Still Javascript. All methods involve javascript are bad practice and google bot penalises.
Regards,
June 7, 2019 at 1:30 pm #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 …June 10, 2019 at 12:48 pm #1108806 -
AuthorPosts
- You must be logged in to reply to this topic.