• Resolved mamouneyya

    (@mamouneyya)


    I feel lost with the little documentation available to this plugin. I want to implement geo-tagging for custom post type I’ve created. However, I cannot get this working.

    What I want:
    (1) The ability to geo-tag custom posts type called ‘schools’.
    (2) The ability to display a map with all schools as markers, on some page.

    What I did:
    (1) Created a custom type for schools based on ‘posts’, using Custom Post Type UI plugin.
    (2) Checked this option to include the map with my schools type: https://grab.by/6Txr
    (3) Added some schools to my WordPress, and geo-tagged them.
    (4) Added the piece of code mentioned in this thread to the end of the file: /wp-geo/includes/shortcodes.php
    (5) Created a page called ‘Map’ and entered the shortcode: [wp_geo_mashup]

    Now I see the map on that page, but it’s being displayed without any marker to the existed schools.

    Any help is highly appreciated.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Ben Huson

    (@husobj)

    In the piece of code you added to /wp-geo/includes/shortcodes.php try changing the get_wpgeo_map() function to read as follows:

    get_wpgeo_map(‘numberposts=-1, post_type= schools’);

    Thread Starter mamouneyya

    (@mamouneyya)

    Unfortunately, it doesn’t work ??
    The map is still being displayed without any marker.

    Thread Starter mamouneyya

    (@mamouneyya)

    Ooh, finally I could figure it out. This works:
    get_wpgeo_map(‘numberposts=-1 && post_type= schools’);

    Plugin Author Ben Huson

    (@husobj)

    Sorry, yes it should be:

    get_wpgeo_map('numberposts=-1&post_type= schools');

    or:

    get_wpgeo_map(array('numberposts'=>-1, 'post_type'= >schools));

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: WP Geo] Using the plugin with custom post types’ is closed to new replies.