WP-Geo icon indicating copy to clipboard operation
WP-Geo copied to clipboard

wpgeo_mashup on custom taxonomy for custom post type page

Open RavanH opened this issue 11 years ago • 2 comments

Hi Ben, not sure if this is indeed an issue or if I'm doing something wrong but here goes...

Trying to use

echo do_shortcode('[wpgeo_mashup]');

inside a custom post type custom taxonomy template taxonomy-artistscat.php but on the front end, it shows only a map but no markers. I tried the shortcode before and after the loop… On Settings > WP Geo the option for the custom post type is checked (and on the custom post type single pages, the map shows the marker correctly) and the option All Taxonomies is checked. See screenshot. schermafdruk van 2014-04-01 16 17 36

The taxonomy in question is for the "Artistes" post type...

RavanH avatar Apr 01 '14 14:04 RavanH

Version 3.3.7 still has this issue...

RavanH avatar Apr 22 '14 20:04 RavanH

UPDATE: I think I found out why... when adding the parameter post_type="artist" to the shortcode, it now starts showing markers for all artists type posts.

Looks like the shortcode function shortcode_wpgeo_mashup defaults the "post_type" attribute to null while the function get_wpgeo_map then defaults to "post". Should the function shortcode_wpgeo_mashup not be taking the current post type as default? Or is that reserved for contextual maps?

RavanH avatar Apr 22 '14 22:04 RavanH