Hi Marcos,
SFTP details you provided not working for me. Can you double check please?
I tried to put snippet code under Admin > Snippets that disables GeoDirectory google maps api on /maps-routes & /maps-routes/* pages. But my snippet code doesn’t get reflected on front end. It seems your site is cached by mod_pagespeed. Can you disable mod_pagespeed for a while, so we can debug and check our snippet code?
Here is my snippet code
function _my_add_gmaps_api_args($args){
$args .= "&libraries=places,geometry";
return $args;
}
add_filter('geodir_googlemap_script_extra','_my_add_gmaps_api_args');
// Disable GeoDirectoiry Google Maps on CM Maps Routes pages
function geodirectory_fix_google_map_conflict( $gd_map = '' ) {
global $wp, $wp_query;
if ( !is_admin() && !empty( $wp_query ) && $wp_query->is_main_query() && ( !empty( $wp->query_vars['post_type'] ) || !empty( $wp->query_vars['cmmrm_dashboard_page'] ) ) ) {
$post_type = !empty( $wp->query_vars['post_type'] ) ? $wp->query_vars['post_type'] : '';
$cmmrm_dashboard_page = !empty( $wp->query_vars['cmmrm_dashboard_page'] ) ? $wp->query_vars['cmmrm_dashboard_page'] : '';
if ( ( is_single() || is_archive() ) && ( $post_type == 'cmmrm_route' || $cmmrm_dashboard_page == 'edit' ) ) {
$gd_map = 'none';
}
}
return $gd_map;
}
add_filter( 'geodir_map_name', 'geodirectory_fix_google_map_conflict', 10, 1 );
Thanks,
Kiran