Title: Child Theme adding function.php   adding &quot;Header&quot; Widget Area
Last modified: August 22, 2016

---

# Child Theme adding function.php adding "Header" Widget Area

 *  [GarvanForum](https://wordpress.org/support/users/garvanforum/)
 * (@garvanforum)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/child-theme-adding-functionphp-adding-header-widget-area/)
 * Hi guys,
    I need your help please. Many times I have tried to create a function.
   php file in my child team and it would never work, therefore I have given up 
   and gone ahead editing the main function.php from the theme folder itself (I 
   learned how to use filezilla and wordpress on my own, therefore I do not have
   a strong knowledge).
 * I would like to have a currency widget (which I already have) on the header of
   my site, in order to be visible in every single pages:
 * debruir.com
 * About the “Header” widget, I have followed the instructions written in the following
   post but I never succeed:
 * [https://wordpress.org/support/topic/child-theme-adding-a-header-widget-area?replies=23#post-6274259](https://wordpress.org/support/topic/child-theme-adding-a-header-widget-area?replies=23#post-6274259)
 * I have pasted the following codes in my function.php:
 * <?php
    // Add a widget. if (function_exists(‘register_sidebar’)) { register_sidebar(
   array( ‘name’ => ‘Extra Widget Before Header’, ‘id’ => ‘extra-widget’, ‘description’
   => ‘Extra Widget Before Header’, ‘before_widget’ => ‘<div id=”%1$s” class=”widget%
   2$s”>’, ‘after_widget’ => ‘</div>’, ‘before_title’ => ‘<h2>’, ‘after_title’ =
   > ‘</h2>’ )); } // Place the widget before the header add_filter (‘before_navbar’,‘
   add_my_widget’); function add_my_widget() { if (function_exists(‘dynamic_sidebar’)){
   dynamic_sidebar(‘Extra Widget Before Header’); } }
 * By doing this operation I can see “Extra Widget Before Header” on my WordPress
   dashboard but, whenever I drag and drop the widget in the “Extra Widget Before
   Header” container, it wont work on the front end of my website.
 * Am I doing anything wrong?
    I appreciate your attention guys and I hope I can
   finally solve this issue.
 * Thanks.

Viewing 1 replies (of 1 total)

 *  Thread Starter [GarvanForum](https://wordpress.org/support/users/garvanforum/)
 * (@garvanforum)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/child-theme-adding-functionphp-adding-header-widget-area/#post-5532978)
 * Any help out there, please?

Viewing 1 replies (of 1 total)

The topic ‘Child Theme adding function.php adding "Header" Widget Area’ is closed
to new replies.

## Tags

 * [adding](https://wordpress.org/support/topic-tag/adding/)
 * [area](https://wordpress.org/support/topic-tag/area/)
 * [child](https://wordpress.org/support/topic-tag/child/)
 * [function](https://wordpress.org/support/topic-tag/function/)
 * [header](https://wordpress.org/support/topic-tag/header/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [widget](https://wordpress.org/support/topic-tag/widget/)

 * 1 reply
 * 1 participant
 * Last reply from: [GarvanForum](https://wordpress.org/support/users/garvanforum/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/child-theme-adding-functionphp-adding-header-widget-area/#post-5532978)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
