Here is how i added Awesome Weather Widget to Geodirectory listings pages so that it gets the weather for the town being displayed (https://wordpress.org/plugins/awesome-weather/)
In awesome-weather.php after line 79
$available_locales = array( 'en', 'es', 'sp', 'fr', 'it', 'de', 'pt', 'ro', 'pl', 'ru', 'uk', 'ua', 'fi', 'nl', 'bg', 'sv', 'se', 'ca', 'tr', 'hr', 'zh', 'zh_tw', 'zh_cn' );
add this
$current_location = geodir_get_current_location(array('echo'=> false));
//add_action( 'geodir_after_listing_post_title', 'country_listing', 45 );
//function country_listing() {
global $post;
global $wp_query;
$postid = $wp_query->post->ID;
$postcity= geodir_get_post_meta($postid,'post_city',true);
$postregion= geodir_get_post_meta($postid,'post_region',true);
$postcountry= geodir_get_post_meta($postid,'post_country',true);
//echo $postcountry." - ".$postregion." - ".$postcity;
//}
$location = $current_location;
$location = $current_location.','.$postcountry;
//echo $location;