New home › Forums › Pro Add-on › General queries › Custom Post Type location
Tagged: ACF, custom posts, database, post
- This topic has 5 replies, 2 voices, and was last updated 5 years, 8 months ago by Kirill.
-
AuthorPosts
-
March 20, 2018 at 8:32 am #35837KirillMember
Hi, I have a custom post type named “Coaches”. Every Coach has it’s own location stored in db with lng and lat. I’d like to show the coaches on the map on archive or search page based on search filters. Is this possible? It would be ideal if it works like here http://houzez02.favethemes.com/half-map/. Thank you.
March 20, 2018 at 9:21 am #35841PerryModeratorHi there
Thank you for getting in touch!
Which plugin are you using for custom post types?
Our plugin doesn’t directly support integration with any 3rd party plugins to pull marker data, however we can definitely provide you with a script to convert your data into a format our plugin can understand. I’d be quite happy to do the conversion for you if necessary, would that help?
Kind regards
– PerryMarch 20, 2018 at 9:48 am #35843KirillMemberThank you for your reply. I don’t use any plugin for creating custom post type. It’s set based on this example
// Our custom post type function function create_posttype() { register_post_type( 'movies', // CPT Options array( 'labels' => array( 'name' => __( 'Movies' ), 'singular_name' => __( 'Movie' ) ), 'public' => true, 'has_archive' => true, 'rewrite' => array('slug' => 'movies'), ) ); } // Hooking up our function to theme setup add_action( 'init', 'create_posttype' );
I also created lat and lng, as well as map_parent_id, in post meta.
- This reply was modified 5 years, 8 months ago by Kirill.
March 20, 2018 at 10:13 am #35845KirillMemberI can provide you with db dump and with a screenshot.
Attachments:
You must be logged in to view attached files.March 20, 2018 at 1:50 pm #35851PerryModeratorHi there,
Please give me your database dump and I’ll get that converted for you!
Kind regards
– PerryMarch 20, 2018 at 2:11 pm #35852KirillMemberThis reply has been marked as private. -
AuthorPosts
- You must be logged in to reply to this topic.