php - Use custom post type for a store locator

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 l

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?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744805385a4594743.html

相关推荐

  • php - Use custom post type for a store locator

    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 l

    2天前
    50

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信