Want description only to show on back-end and not on front end

New home Forums Pro Add-on Want description only to show on back-end and not on front end

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #26950
    Beatrice
    Member

    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?

    #26951
    Nick Duncan
    Keymaster

    Hi 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
    Nick

    #26965
    Beatrice
    Member

    Thanks 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.

    #26988
    Nick Duncan
    Keymaster

    Hi 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
    Nick

    #27000
    Beatrice
    Member

    Thanks 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.

    #27027
    Nick Duncan
    Keymaster

    Please can you send me a link to your site? Please also note that the backticks should not be included in the code.
    Kind regards
    Nick

    #27033
    Beatrice
    Member

    Hi Nick,
    here’s the link

    mietservice


    Kind regards,
    Beatrice

    #27035
    Beatrice
    Member

    Hi 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.

    #27041
    Beatrice
    Member

    …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!

    #27104
    Nick Duncan
    Keymaster

    Hi 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.

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