Only load Gmaps when Category is Real Estate and Sub Category is Homes for Sale
Hi,
I am looking to modify Theme-Enqueue.php (line 54 to 59) so that Gmap only displays when category Real Estate and it's sub category Homes for Sale is selected.
Could someone of you great programmers suggest a code for this?
// only load colorbox & gmaps when we need it
if ( is_singular(APP_POST_TYPE) ) {
$cp_gmaps_lang = esc_attr( get_option('cp_gmaps_lang') );
$cp_gmaps_region = esc_attr( get_option('cp_gmaps_region') );
wp_enqueue_script('colorbox', get_bloginfo('template_directory').'/includes/
js/colorbox/jquery.colorbox-min.
js', array('jquery'), '1.3.15');
wp_enqueue_script('google-maps', "http://maps.google.com/maps/api/
js?sensor=false&language=$cp_gmaps_lang&re gion=$cp_gmaps_region", array('jquery'), '3.0');
Thank you, Cheers Roald