• Resolved dleeward

    (@dleeward)


    Will the geocoder work for custom post types? It’s not displaying on the edit page for my custom post type.

Viewing 1 replies (of 1 total)
  • Plugin Author pschwarzgm

    (@pschwarzgm)

    Sorry for the late reply – as the plugin author I did not receive an email or notification that a question was asked, or it went to my junk folder. Previously the plugin worked for every post type. I later restricted it to Post and Page types because custom post types are used for a lot of things, many of which geocoding makes no sense. The original code still exists but is commented out – if you feel comfortable modifying code you can re-enable by:

    1. Edit map-posts-common.php (in folder plugins/map-posts-free/includes/
    2. Look for function named

    add_register_map_meta_box()

    3. Comment out the 2 lines of code under the comment

    //Alternate code to add map configuration to only non-custom post types and pages

    4. Re-enable the code commented out below i.e.

    $post_types = get_post_types( array(), ‘objects’ );
    foreach ( $post_types as $post_type ) {
    add_meta_box( ‘define_map_meta_box’,
    ‘Define Map’,
    array($this,’add_define_map_meta_box’),
    $post_type->name, ‘normal’ );
    }

Viewing 1 replies (of 1 total)
  • The topic ‘Work with custom post types’ is closed to new replies.