Try using this short code passing your post type as a parameter:
[wpgeo_mashup post_type="your_post_type" /]
my post type is “project” so i have added [wpgeo_mashup post_type=”project” /] to a page and nothing shows
aha – turns out i have to have maps enable on pages for it to show on a page using a shortcode – not sure i want to do this – is it possible to allow the shortcode to process without enabling users to enter a location for a page? i would like to keep pages admin to not show the WP Geo meta box
If you don;t want to enable it for pages in the admin, you’ll have to get your hands dirty by adding some PHP code to your theme’s functions.php file. I’ve not tested this, but something like this may work:
function my_wpgeo_show_maps( $show_maps ) {
if ( is_page() ) {
return true;
}
return $show_maps;
}
add_filter( 'wpgeo_show_maps', 'my_wpgeo_show_maps' );
I’ll give this a go and report back thank u 🙂
have decided to add the map using a template – is there a template tag for the mashup map? I’d also like to adjust the zoom as it’s too zoomed out for my liking.
Thanks
Figured it out – also set it only to display selected posts on the map via a metabox field
$query = array(
'post_type' => 'project',
'posts_per_page' => -1,
'meta_query' => array(
array(
'key' => 'eco_project_feature',
'value' => 'featured',
)
),
'zoom' => 8,
'height' => 400,
);
echo get_wpgeo_map( $query, $options = null );