-
Notifications
You must be signed in to change notification settings - Fork 18
wpgeo_map
Ben Huson edited this page May 29, 2013
·
10 revisions
<?php wpgeo_map( $query ); ?>
For a full list of query parameters see get_posts().
<?php
$wp_geo_options = get_option( 'wp_geo_options' );
$query = array(
'width' => $wp_geo_options['default_map_width'],
'height' => $wp_geo_options['default_map_height'],
'type' => $wp_geo_options['google_map_type'],
'polylines' => $wp_geo_options['show_polylines'],
'polyline_colour' => $wp_geo_options['polyline_colour'],
'align' => 'none',
'numberposts' => -1,
'posts_per_page' => -1,
'post_type' => 'post',
'post_status' => 'publish',
'orderby' => 'post_date',
'order' => 'DESC',
'markers' => 'large',
'markers' => 'large',
'offset' => 0,
'category' => null,
'include' => null,
'exclude' => null,
'meta_key' => null,
'meta_value' => null,
'post_mime_type' => null,
'post_parent' => null
);
?>
$query
(array) List of query parameters. For a full list see get_posts().
Default: Same as get_posts()
$options
(array) (Optional) List of options. Currently not used.
Output is echoed.
Output all posts from a category with ID 4.
<?php
wpgeo_map( array(
'cat' => 4
) );
?>
Output all posts from the current category.
<?php
wpgeo_map( array(
'cat' => get_query_var( 'cat' )
) );
?>
wpgeo_map() is located in includes/templates.php