GeoDirectory SupportHow do I the name of a city as a variable I can use or call? – GeoDirectory Support https://wpgeodirectory.com/support/topic/how-do-i-the-name-of-a-city-as-a-variable-i-can-use-or-call/feed Fri, 26 Dec 2025 19:12:39 +0000 http://bbpress.org/?v=2.5.14-6684 en-US https://wpgeodirectory.com/support/topic/how-do-i-the-name-of-a-city-as-a-variable-i-can-use-or-call/#post-18669 <![CDATA[How do I the name of a city as a variable I can use or call?]]> https://wpgeodirectory.com/support/topic/how-do-i-the-name-of-a-city-as-a-variable-i-can-use-or-call/#post-18669 Thu, 16 Oct 2014 23:02:18 +0000 Greg McEwan Marriott Hi am trying to automate a weather widget to display the weather for a particlular city, or the displayed city… Is there a shortcode or a global variable for the city, Country i can use to replace the $locationcity in the weather widget?

]]>
https://wpgeodirectory.com/support/topic/how-do-i-the-name-of-a-city-as-a-variable-i-can-use-or-call/#post-18735 <![CDATA[Reply To: How do I the name of a city as a variable I can use or call?]]> https://wpgeodirectory.com/support/topic/how-do-i-the-name-of-a-city-as-a-variable-i-can-use-or-call/#post-18735 Fri, 17 Oct 2014 16:46:20 +0000 Paolo Hi,

you can get the current location with the function

geodir_get_current_location();

example:
add this within the widget code:

$current_location = geodir_get_current_location(array('echo'=> false));

and use the variable :

$current_location;

wherever needed.

Thx

]]>
https://wpgeodirectory.com/support/topic/how-do-i-the-name-of-a-city-as-a-variable-i-can-use-or-call/#post-18769 <![CDATA[Reply To: How do I the name of a city as a variable I can use or call?]]> https://wpgeodirectory.com/support/topic/how-do-i-the-name-of-a-city-as-a-variable-i-can-use-or-call/#post-18769 Fri, 17 Oct 2014 21:52:14 +0000 Greg McEwan Marriott 🙂 Worked like a DREAM (awesome weather widget) – THANK YOU !!!!!!!!!!!!!!!!!!!!!!!

]]>
https://wpgeodirectory.com/support/topic/how-do-i-the-name-of-a-city-as-a-variable-i-can-use-or-call/#post-19104 <![CDATA[Reply To: How do I the name of a city as a variable I can use or call?]]> https://wpgeodirectory.com/support/topic/how-do-i-the-name-of-a-city-as-a-variable-i-can-use-or-call/#post-19104 Wed, 22 Oct 2014 13:41:45 +0000 czar @greg: You can share this change to ‘awesome weather widget’ and explain how you did it?

thanks

]]>