Custom Post Type location

New home Forums Pro Add-on General queries Custom Post Type location

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #35837
    Kirill
    Member

    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.

    #35841
    Perry
    Moderator

    Hi 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
    – Perry

    #35843
    Kirill
    Member

    Thank 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.
    #35845
    Kirill
    Member

    I can provide you with db dump and with a screenshot.

    Attachments:
    You must be logged in to view attached files.
    #35851
    Perry
    Moderator

    Hi there,

    Please give me your database dump and I’ll get that converted for you!

    Kind regards
    – Perry

    #35852
    Kirill
    Member
    This reply has been marked as private.
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.