New home › Forums › Pro Add-on › Making external Links nofollow
Tagged: External Links, Nofollow, pro
- This topic has 6 replies, 4 voices, and was last updated 4 months, 1 week ago by Matthew.
-
AuthorPosts
-
January 7, 2021 at 10:08 am #66491MKAffParticipant
Hey,
thanks for the awesome plugin!I’ve just got a quick question: How to mark external Links in the table below the embedded map as nofollow.
So far, we’ve used this trick here (https://www.wpgmaps.com/forums/topic/making-the-link-inside-the-info-balloon-nofollow/). With 8.1. you’ve apparently restructured your code. What’s the 8.1. solution for this or – even better – could you implement this option in one of your upcoming updates?
Keep up the great work & best regards,
MaxJanuary 7, 2021 at 10:40 am #66493StevenModeratorHi there,
Thank you so much for getting in touch, we really appreciate your time.
Unfortuantely, this is a very specific scenario, so changing this will affect every WP Google Maps user’s website.
We have adjusted the core code of WP Google Maps to function differently so I took a quick look at the core code and I believe a simple adjustment might help with this.
Could I kindly ask you to navigate to the wp-google-maps-pro/js/v8/pro-info-window.js file and adjust the line “283”
From:
var a = $(“”);To:
var a = $(“”);Kindly let me know if this perhaps works for you?
Kindest Regards,
Steven De BeerJanuary 8, 2021 at 9:03 am #66529MKAffParticipantHey,
thanks for your reply!I think, you meant adding rel=’nofollow’ to this code line:
var a = $(““) -> var a = $(““);
Unfortunately, this didn’t quite do the job.
I also tried adding this line
a.attr(“ref”,”nofollow”)
below, but it also did’nt work.
Do you have any other hints?
Thanks in advance!
January 8, 2021 at 12:14 pm #66540StevenModeratorHi there,
Thank you so much for getting back to me.
My sincerest apologies for the inconvenience, I am not quite sure what occurred with my copy paste there.
Kindly see the screenshot attached simply for reference.
You will need to enable and disable the Developer mode via Maps -> Settings -> Advanced as this will allow the scripts to recompile.
Kindest Regards,
Steven De Beer- This reply was modified 2 years, 8 months ago by Steven.
Attachments:
You must be logged in to view attached files.April 21, 2023 at 1:33 pm #77031cleopatraMemberReviving this thread (please let me know if I need to start a new thread?), was about to start a new one but it’s the same question… how do I make external links nofollow (both in the marker listing and the info balloon)?
April 25, 2023 at 9:26 am #77045MatthewModeratorHi @cleopatra,
Thank you for getting in touch with us, we do appreciate your time.
We may continue in this thread, thus please my you provide me with the link to your map so that I may write the respective custom JS code needed for this?
I look forward to hearing back from you.
Kindest Regards,
MatthewMay 8, 2023 at 3:22 pm #77171cleopatraMemberSorry for the delayed response, I didn’t get a notification.
My website:Where to stay
May 15, 2023 at 8:47 am #77231MatthewModeratorHi @cleopatra,
Thank you for getting back to me and for your time on this, I really appreciate it!
Thank you for the link, I have thus taken a look at your map and have written your respective code thus please may you save the below code into the “Custom JS” setting block (Maps -> Settings -> Advanced Settings):
jQuery(function($){ $(document).on('markerlistingupdated.wpgmza', function(){ $('.wpgmaps_mlist_row').each(function(){ let row = $(this); row.find('a').each(function(){ let link = $(this); link.attr('rel', 'nofollow'); }) }) }) $(document).on('infowindowopen.wpgmza', function(event){ let infowindow = $(event.target.element); infowindow.find('a').each(function(){ let link = $(this); link.attr('rel', 'nofollow'); }) }) })
Once this has been done, please may you clear your browser cache and confirm if this helps?
I look forward to hearing back from you.
Kindest Regards,
Matthew -
AuthorPosts
- You must be logged in to reply to this topic.