Post not calling city or state

You are here : Home / Post not calling city or state

Hi!
I want to show only custom post types on my map. It’s working, but how can I sort them by country?
It’s showing “unidentified” when I sort by city or so. Shouldn’t be automatic, as it is with locations?

My problem is that on the list, the default value are {marker_city} and {marker_country}, but it doesn’t work with a post (I’ve tried with a normal post too). I’ve changed temporarily for {post_category} because it shows at least the country, which is a category.
Thanks!

Public
Hello,
You can sort only by title,address,category and category priority. Please share your page url where map is located so i can also check it at our end.

Thanks
#1
Public
Hello,
I checked your link, you can only filter with your city or country category, sorting by city, country is not possible in this plugin. You also dont have created city category.

Thanks
#3
Public
Hi!
No, I don't have a city category because it wouldn't be needed.

When I add a location and show them on the list, the city, country or address will be automatically shown as the {marker_XXX}, but it doesn't work when I list a post. That's my problem.
As I insert the address and coordinates, the city, country and address show automatically on the list. Shouldn't be the same for the posts?
How can I achieve it?

When you checked the link, it was probably showing the {post_category}, otherwise {marker_city}, {marker_country} would show undefined, undefined.
#4
Public
Hello,
Sorry for late reply, was in holiday so couldn't back to you. In the case of posts location creation {marker_city} and {marker_country} placeholder wont work. You need to create a custom fields related to it like( city and country) where you need to insert the values of fields like screenshot.
Then go to add/manage map and select the map, you need to insert custom fields placeholder like {%city%} and {%country%} and save it. Than your city and country will display in infowindow.

Please check this tutorial for more help: https://wpgmp.flippercode.com/docs/how-to-show-post-infowindow-using-custom-field/
I hope it helps you.
Thanks

#6
Public
Thanks for your answer, Divyang!
Yeah, I thought that If it wasn't possible, I should create custom fields and show them, but then in theory I'm not able to sort by custom type, right?
Or I could change the code to choose sort by city or country, right?

Also, could please explain to me why marker_country and marker_city don't work with posts, but marker_address does? I have a clue, but I'm not sure. Is that because when you type the address on locations it also creates two different forms, country and city and the tags marker_city and marker_country call these forms? So when you insert the address on a post, it's just the form related to a dress, right?
Again, thanks for your reply!
#7
Public
Hello,
yes, custom post type sorting is not possible right now in this plugin, i will definitely discuss this topic of placeholder with our developer team and thanks for your valuable suggestions.

Thanks
#8

Please login or Register to Submit Answer

Customize Product according to your requirements?

We will be glad to discuss any of your needs related to our wordpress plugins . if any of functionality you'd like to see in products, you can reach us by via email hello@flippercode.com.