I want to make a store locator. I've registered a cpt named portfolio and I want to add to it all the needed info like latitude and longitude that will be used to display a marker on a leaflet.js map.
I'm not sure how to proceed. I need to open a popup on the backend that will let the user search and then select a location on the map and after this, save all the post information like title, post content and the latitude/longitude of the place to add to the store locator that is displayed on the fornt-end.
Can I use the wp_insert_post
function to achieve this or it's better to use the standard ui of wordpress? If I use the standard ui, I'don't know how to open a popup only for this kind of posts, will edit_form_after_editor
do the trick? How the custom post meta (lat/lng) can be added?
php - Use custom post type for a store locator
评论列表(0)
- 暂无评论