Hi Berto,
Please try this code.
/**
* Dequeue core scripts & styles on non GD pages.
*
* Note: This may cause JavaScript errors when page contains widget/shortcode from GD.
*/
function gd_snippet_dequeue_scripts() {
if ( class_exists( 'GeoDir_Frontend_Scripts' ) && ! geodir_is_geodir_page() && !is_front_page() ) {
remove_action('wp_footer', array( 'GeoDir_Frontend_Scripts', 'js_location_functions' ));
remove_action( 'wp_enqueue_scripts', array( 'GeoDir_Frontend_Scripts', 'load_scripts' ) );
remove_action( 'wp_print_scripts', array( 'GeoDir_Frontend_Scripts', 'localize_printed_scripts' ), 5 );
remove_action( 'wp_print_footer_scripts', array( 'GeoDir_Frontend_Scripts', 'localize_printed_scripts' ), 5 );
}
}
add_action( 'wp', 'gd_snippet_dequeue_scripts', 100 );
Thanks