New home › Forums › Pro Add-on › Want description only to show on back-end and not on front end
Tagged: back end, description
- This topic has 9 replies, 2 voices, and was last updated 5 years, 10 months ago by Nick Duncan.
-
AuthorPosts
-
May 9, 2017 at 9:52 am #26950BeatriceMember
I have created a marker with latitudes and longitudes.
Now I have many more to add, but it is difficult to know them what they are unless I add a description.But I want the description to show only on backend and not front end.
I created a description for a marker inside a HTML div with CSS “display:none;”. This works fine and does not show on front-end, but when I do “View:source” from browser, I can see the description.Is there any way where I add description that shows only on back-end and do not display on front end?
May 9, 2017 at 10:02 am #26951Nick DuncanKeymasterHi Beatrice
Thank you for getting in touch and for using my plugin.I will have to change the code to accommodate this for you, so that it does not show up in the source. Are you comfortable in sending me either a temp admin account or FTP details so I can get this done for you?
Kind regards
NickMay 9, 2017 at 8:33 pm #26965BeatriceMemberThanks Nick for the above.
If you can send me the code change and let me know on which part of the plugin you want me to add the same, I shall do it myself.
May 10, 2017 at 7:48 am #26988Nick DuncanKeymasterHi Beatrice
Please open wp-google-maps-pro/js/core.js and search for this:
`var wpgmza_orig_desc = wpmgza_desc;`
There should be two instances of this. Please change that to this:
`var wpgmza_orig_desc = ”;`
If you are wanting to remove the description from the “marker listing” functionality as well please let me know.
Kind regards
NickMay 10, 2017 at 1:01 pm #27000BeatriceMemberThanks Nick. I updated the code as per the above and it has stopped loading the Map now.
I checked on firefox and iPhone and it is not showing up.May 11, 2017 at 7:41 am #27027Nick DuncanKeymasterPlease can you send me a link to your site? Please also note that the backticks should not be included in the code.
Kind regards
NickMay 11, 2017 at 10:25 am #27033BeatriceMemberHi Nick,
here’s the linkmietservice
Kind regards,
BeatriceMay 11, 2017 at 11:26 am #27035BeatriceMemberHi Nick,
can you give me an idea as to when I can expect the map to only show pins, no details on the front end?
I would be happy to remunerate you if it enables you to prioritize this.
Thanks.May 11, 2017 at 3:51 pm #27041BeatriceMember…as mentioned yesterday, the code that you had provided was added without any backticks, but it made the map disappear. Could you kindly re-check and provide me the updated code which makes the pins work on front-end and its description on back-end?
Thanks a lot!
May 14, 2017 at 10:42 am #27104Nick DuncanKeymasterHi Beatrice
Sorry for not getting back to you sooner.Please open core.js and look for the following (around line 1725):
var wpgmza_orig_desc = wpmgza_desc; if (wpmgza_desc !== "") { var wpmgza_desc = '<p class="wpgmza_infowindow_description">'+jQuery(this).find('desc').text()+'</p>'; }
Please change that to
var wpgmza_orig_desc = wpmgza_desc; wpgmza_orig_desc = ''; if (wpmgza_desc !== "") { var wpmgza_desc = '<p class="wpgmza_infowindow_description">'+jQuery(this).find('desc').text()+'</p>'; wpmgza_desc = ''; }
Then look for (around line 2192)
var wpgmza_orig_desc = wpmgza_desc; if (wpmgza_desc !== "") { var wpmgza_desc = '<p class="wpgmza_infowindow_description">'+val.desc;+'</p>'; }
and change it to
var wpgmza_orig_desc = wpmgza_desc; wpgmza_orig_desc = ''; if (wpmgza_desc !== "") { var wpmgza_desc = '<p class="wpgmza_infowindow_description">'+val.desc;+'</p>'; wpmgza_desc = ''; }
I have tested this on my side and it works. If you are having issues, please email on nick [@] wpgmaps dot com so I can assist you further.
-
AuthorPosts
- You must be logged in to reply to this topic.