Skip Navigation

[Resolved] Map showing in post admin but not rendering on page

This thread is resolved. Here is a description of the problem and solution.

Problem:
I added a Address in the Post Backend but this Post is not showing a Map or Marker in the front end

Solution:
- Insert the Map to your Post Body or Content template using the Views GUI "Fields and Views" > "Map"

- Insert a marker as well with the same GUI

- If you see a Map but no marker you need to add a Google API key to your Views Maps settings.

Relevant Documentation:
https://toolset.com/documentation/user-guides/display-on-google-maps/
https://toolset.com/documentation/user-guides/data-caching-for-google-maps-addresses/

This support ticket is created 8 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 7 replies, has 2 voices.

Last updated by suzyo 8 years, 1 month ago.

Assisted by: Beda.

Author
Posts
#375282

Map showing in admin but not on page I have NO IDEA of how to set this up.

Before I do anything else - I already have field called "Address" that I use for address of hotel, restaurant, etc.

There is a field included with new Toolset Maps called "Address", so, do I have to change the name of my field? If so, all of the addresses I have added to my CPTs will be wiped out.

#375334

Well, the new Toolset Maps Address Field is special.
It allows you to type in a Address, and this will instantly query available addresses (from Google API) and even plot them on the WordPress backend Map.

If you have a field with name Address, you can not use it the same way you use the Toolset Maps address field, but it will not conflict, as your Field is probably not a Types field and therefore has a different Slug.
Even then, you can have Fields with same slug for different Groups of Fields.

You can, when you insert the Map in your content, choose where from to load your Address.

This is all deeply elaborated here:
https://toolset.com/documentation/user-guides/display-on-google-maps/

You will insert the Map ShortCode, and the Marker ShortCode.
This GUI will ask you, where from to load your Address.

This can be manual or Custom Field

Please let me know if you have further questions regarding the issue mentioned in this Thread

Thank you for your patience.

#375337

Yes, thanks for that link. I have been all over that, many times, it is not helping me.

I understand some of this, thanks for update on fields.

I have the GUI in the admin of the CPT, works fine there, but does not display on page.

#375340

Then you either do not call correctly the ShortCodes, or the Data is not stored correctly, or you experience Google API restrictions, as explained here:
https://toolset.com/documentation/user-guides/data-caching-for-google-maps-addresses/

If you want me to set up a Sample Post with the Address and ShortCodes, I can do that, so you can see how it has to be inserted.

Please assure that this(issue) is happening as well on a clean WordPress with no AddOn Plugins as well first.

Also, i will need to work on a site where I can make changes and disable/enable plugins and code.

I will additionally need the access details attached to this post, even if you provided them previously, this is process and company policy.

I will enable the private form, and you will provide the access details and all links where I can find the current Fields, Posts and codes.

Thank you

#375355

[your-site]/restaurant/water-wheel-cafe-bakery-bar/

[your-site]/wp-admin/admin.php?page=ct-editor&ct_id=607&action=edit

Since I could not find the instructed ShortCodes in that Content Template I added the sample on top of it all, in a Custom <div> structure with class "toolset"

You can now see the Map, and the Marker on it.

To add Google Key you can follow this DOC:
- Visit the Google Developer console here: hidden link
- Select a project (or create a new one)
- In Overview > Google APIs > Google Maps APIs > Google Maps Geocoding API, click Enable API
- In Credentials, click New Credentials > API Key > Browser Key > Create

For google related issues you may relate to their DOC's and Support, as this issue is not a problem generated by Toolset but by Google

Please do not hesitate to open a new thread if other issues or problems arise

Thank you for your patience.

#375367
Screen shot 2016-03-14 at 4.51.57 AM.png

So far, so great! Thank you so much, Beda. I will include screenshot of code as entered on the content template for other people trying to figure this out.

I am still confused about how we got here. I had added a Post Field using the Maps Address field. Is that the one that is being used, or did you add something else?

Finally, I actually had gone ahead and renamed my Text Field from "Address" to "Addresses" and I would like to name it back. but of course I get a warning: "Field slug already used," and, yes, it's used by a bunch of other CPTs. How can I name it back?

Thank you so much, you have saved my entire week!

#375373

I didn't add a new field, those where there already.

All I have don is added the correct ShortCodes to your Content Template as you show in your ScreenShot.

To rename a Custom Field, to head to Types > Custom Fields > your_group > your_field and edit name as well as slug of it, then save it.

If it gives a warning that this field is already used, either delete the other field from Types > Custom Fields > Custom Fields Control, or use another Slug.

Thank you

#375374

Yay! Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.