Title: Variable location
Last modified: August 21, 2016

---

# Variable location

 *  Resolved [krenzelman](https://wordpress.org/support/users/krenzelman/)
 * (@krenzelman)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/variable-location/)
 * I’m trying to pull in a location variable. In this instance the variable has 
   the City and State. This is the code that I am trying, but am having no luck 
   getting it to display. Suggestions?
 * [awesome-weather location=”.$item_adrs_region.” units=”F” size=”tall” forecast_days
   =”2″ hide_stats=1 background=”[http://urltoanimage.jpg&#8221](http://urltoanimage.jpg&#8221);
   custom_bg_color=”#cccccc” inline_style=”width: 200px; margin: 50px; float: center;”]
 * [http://wordpress.org/plugins/awesome-weather/](http://wordpress.org/plugins/awesome-weather/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Hal Gatewood](https://wordpress.org/support/users/halgatewood/)
 * (@halgatewood)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/variable-location/#post-4259850)
 * You can’t put variables like that in the WordPress editor. You would have to 
   add something like this to your theme files:
 * `<?php echo do_shortcode('[awesome-weather location="' . $item_adrs_region . '"
   units="F" size="tall" forecast_days="2" hide_stats=1 background="http://urltoanimage.
   jpg" custom_bg_color="#cccccc" inline_style="width: 200px; margin: 50px; float:
   center;"]'); ?>`
 *  Thread Starter [krenzelman](https://wordpress.org/support/users/krenzelman/)
 * (@krenzelman)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/variable-location/#post-4259859)
 * Worked perfectly. Thank you !

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Variable location’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/awesome-weather_ad7c7d.svg)
 * [Awesome Weather Widget](https://wordpress.org/plugins/awesome-weather/)
 * [Support Threads](https://wordpress.org/support/plugin/awesome-weather/)
 * [Active Topics](https://wordpress.org/support/plugin/awesome-weather/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/awesome-weather/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/awesome-weather/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [krenzelman](https://wordpress.org/support/users/krenzelman/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/variable-location/#post-4259859)
 * Status: resolved