Reply To: Mashup with Tax Query

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

#13709
Chris
Keymaster

    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.