Viewing 5 replies - 1 through 5 (of 5 total)
  • Sounds like your looking for map_content

    map_content – global, single, contextual, or a WP_Query object. Overrides the default content of a map. The WP_Query object is only an option for the template tag, and will include only posts returned by the query on the map.

    Thread Starter Jer Clarke

    (@jeremyclarke)

    Hi Super Powered, thanks for replying.

    I know about map_content already though, and I don’t think it will help. What I need is a way to show only a specific “post type” using the shortcode because I want a map of all pages but not posts.

    map_content=’global’ shows both posts+pages, ‘contextual’ doesn’t give a way to show all pages and ‘single’ won’t help either.

    You can pass a wordpress query into map-content. I have not tested it with the short code, however in the page template:

    $query_args = array
    (
        'post_type'      => 'page',
    );
    $the_query = new WP_Query($query_args);
     $args = array
    (
        'map_content' => $the_query
    )
    echo GeoMashup::map($args);?>
    Plugin Author Dylan Kuhn

    (@cyberhobo)

    The query variable you want is a bit further down in the list: map_post_type:

    [geo_mashup_map map_content="global" object_name="post" map_post_type="page"]

    Thread Starter Jer Clarke

    (@jeremyclarke)

    Thanks Dylan! OMG I can’t believe I didn’t find it! Perfect.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Show a map with ONLY pages (not posts)’ is closed to new replies.