最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

php - Use custom post type for a store locator

programmeradmin2浏览0评论

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?

发布评论

评论列表(0)

  1. 暂无评论