Reply To: Mashup with Tax Query

Home Forums MapPress Support Mashup with Tax Query Reply To: Mashup with Tax Query


There is no way to substitute variables (like $parentID) in a shortcode entered in the WordPress post editor.

If you use PHP, another way to create the map is to use the do_shortcode() command.

Assuming that $parentID is the slug for a term in the ‘area’ taxonomy you could write:

$query = “post_type=location&posts_per_page=-1&area=” . $parentID;
do_shortcode(‘[mashup query="' . $query . '"]‘);

There are some other query string examples for custom taxonomies in the plugin documentation.