Elendil57
Forum Replies Created
-
Forum: Plugins
In reply to: [Pronamic Google Maps] Filtering displayed posts in Mashup mapYes ! I’ve made it !
I re-give the fonctionnality of this code :
displaying in Mashup map markers which only correspond to posts displayed on the current page.
Handsome for posts in subcategory!Maybe it should be optimized, for sure ??
Here the code :
$cat = get_query_var('cat'); global $catencours; $catencours = get_category ($cat); global $catencours2; $catencours2 = $catencours->cat_ID; // for verifying the value of $catencours2, should be delete when it works : echo 'Current cat is : num '.$catencours2.'<br/><br/>'; pronamic_google_maps_mashup( array( 'category__in' => array( $catencours2 ), 'posts_per_page' => -1, ) , array( 'width' => 295 , 'height' => 370 , 'map_type_id' => 'roadmap', 'marker_options' => array( 'icon' => 'YOUR_ICON.png' ) ) );
Hope it’ll help other people,
Elendil57
Forum: Plugins
In reply to: [Pronamic Google Maps] Filtering displayed posts in Mashup mapHere’s my code :
I would like that the Mashup works only for posts in $catencours2
<?php $cat = get_query_var('cat'); global $catencours; $catencours = get_category ($cat); global $catencours2; $catencours2 = $catencours->cat_ID; $posts_array = get_posts( $args ); $args = array( 'category' => $catencours2, 'post_type' => 'post', 'suppress_filters' => true ); echo 'Current cat is : num '.$catencours2; if ( is_category ($catencours2)) { pronamic_google_maps_mashup( array( 'post' => $posts_array, 'posts_per_page' => -1, ) , array( 'width' => 295 , 'height' => 370 , 'map_type_id' => 'roadmap', 'marker_options' => array( 'icon' => 'https://www.metz-hardware.com/dehors-les-enfants/wp-content/uploads/2013/02/marker-gmap.png' ) ) ); } else { theme_print_sidebar('default', $places); }
Thanks,
Elendil57
Hi,
Maybe this could help you – Jquery problem ?
https://www.ads-software.com/support/topic/odd-behaviour-with-new-media-manager-wp35
Hope it’ll help,
Regards,
Elendil57
Hi all,
I’ve just posted something which could help you :
Hope it’ll help,
Regards,
Elendil57
Hi,
You could use custom fields to enter your address and display it on the post.
The value of the custom field ‘adress’ will be injected easily in the CGMP shortcode.For exemple, in my article editor, I wrote : ( with help of Exec-PHP for php directly inside posts, but could be inserted in pages or posts template )
<?php global $post; $loca = get_post_meta($post->ID, 'adress', true); ?>
and in the shortcode, I replace
addmarkerlist="123 foo bar{}1-default.png"
by
addmarkerlist="<?php echo $loca?>{}1-default.png"
It works, hope I’ve helped you,
Regards,
Elendil57
Hi,
Has anyone found a solution to this thorny problem ?
Regards,
Elendil57
Forum: Plugins
In reply to: [Comprehensive Google Map Plugin] Map Mashups by Taxonomy Term?Hi redwall,
Have you find how to use taxonomy for filtering map on category pages ?
Regards,
Elendil57
Forum: Plugins
In reply to: [Comprehensive Google Map Plugin] Odd behaviour with new media manager WP3.5Hi Orionrush,
I accidentally found the solution to this very disturbing problem :
you must edit 2 files for changing used version of Jquery and supplied by Google for this amazing plugin.
This files are cgmp.framework.js and cgmp.framework.min.js.
Both are located in ../assets/js.Change the listed versions, like
src=”https://ajax.googleapis.com/ajax/libs/jquery/1.x.x/jquery.min.js”
by “1.9.0”, save, and … voila, it works !Maybe a conflict with multiple Jquery loaded by WP and the plugin.
Hope it’ll help you and other people,
Regards,
Elendil57