Title: code for putting the widget in php
Last modified: August 21, 2016

---

# code for putting the widget in php

 *  Resolved [Hrvojeee](https://wordpress.org/support/users/hrvojeee/)
 * (@hrvojeee)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/code-for-putting-the-widget-in-php/)
 * Hi, can You tell me how to put the widget on any custom location on my website,
   that is, how to hardcode the widget (since i want it in the header.php file),
   is it something like this:
 * <?php add_action( ‘widgets_init’, ‘weather_for_us_v1_0_load’ ); ?>
 * [https://wordpress.org/plugins/weather-for-us-widget/](https://wordpress.org/plugins/weather-for-us-widget/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [zenogaisis](https://wordpress.org/support/users/zenogaisis/)
 * (@zenogaisis)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/code-for-putting-the-widget-in-php/#post-4652421)
 * You can go to site generate code and paste it anywhere you want. WordPress will
   only allow you to install at widget locations. If you want it at any arbitrary
   location go to [http://weatherfor.us/](http://weatherfor.us/) and there is a 
   panel down there to generate code.

Viewing 1 replies (of 1 total)

The topic ‘code for putting the widget in php’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/weather-for-us-widget_858f3f.svg)
 * [Weather for us - animated weather widget](https://wordpress.org/plugins/weather-for-us-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/weather-for-us-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/weather-for-us-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/weather-for-us-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/weather-for-us-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/weather-for-us-widget/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [zenogaisis](https://wordpress.org/support/users/zenogaisis/)
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/code-for-putting-the-widget-in-php/#post-4652421)
 * Status: resolved