Support » Plugin: WP Geo » Summary Map

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

    (@husobj)

    Try using this short code passing your post type as a parameter:

    [wpgeo_mashup post_type="your_post_type" /]

    Thread Starter ellebillias

    (@ellebillias)

    my post type is “project” so i have added [wpgeo_mashup post_type=”project” /] to a page and nothing shows

    Thread Starter ellebillias

    (@ellebillias)

    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

    Plugin Author Ben Huson

    (@husobj)

    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' );
    Thread Starter ellebillias

    (@ellebillias)

    I’ll give this a go and report back thank u 🙂

    Thread Starter ellebillias

    (@ellebillias)

    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

    Thread Starter ellebillias

    (@ellebillias)

    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 );
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Summary Map’ is closed to new replies.