Description
Outputs a map based on a query. It accepts the same parameters as the WordPress get_posts() function/
Usage
<?php get_wpgeo_map( $query, $options = null ); ?>
Parameters
$query
(array) Array of query arguments an options.
- width – Defaults to map width in settings
- height - Defaults to map height in settings
- type - Defaults to map type in settings
- polylines – Defaults to show polylines in settings
- polyline_colour - Defaults to polyline colour in settings
- align – Default none
- numberposts – (int) Default -1 (show all posts)
- post_type – Default ‘null’ (posts)
- post_status – Default ‘publish’
- orderby – Default ‘post_date’
- order – Default DESC
- markers – Default ‘large’ marker type.
$options
(array) Not used at present.
Examples
Outputs a map of all posts from category id 4.
<?php wpgeo_map( array( 'cat' => 4 ) ); ?>
Outputs the custom title for post ID 30 or nothing if a custom title has not been set.
<?php echo get_wpgeo_map( array( 'post_type' => 'product', 'width' => 200, 'orderby' => 'post_title' ) ); ?>
Notes
None.
Change Log
Since: ?
Source File
get_wpgeo_map() is located in wp-includes/templates.php.
Related
wpgeo_map