Contextual maps with multiple pages being called
-
I have the following pages:
– UK
— Cambridge
— OxfordCambridge and Oxford render their markers just fine using
<?php echo GeoMashup::map(); ?>
(I need to load the map elsewhere in the page), but is there a way to load both of them in the parent page?I am rendering all the child of UK using page-list‘s tag
[pagelist_ext]
, however this seem to lose the contextual reference for geo-mashup.Is there a way to make it work?
Alternatively, I wrote this which does the trick from
header.php
but I don’t know whether it is the best way to do this (I’m new to WP)<?php $custom_query = new WP_Query( array( 'post_type' => 'page', 'post_parent' => $wp_query->post->ID, ) ); if ( $custom_query->have_posts() ) { echo GeoMashup::map( array( 'map_content' => $custom_query, ) ); } ?> <?php echo GeoMashup::map(); ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Contextual maps with multiple pages being called’ is closed to new replies.