Title: Adding a header widget area
Last modified: August 21, 2016

---

# Adding a header widget area

 *  Resolved [DavisGouveia](https://wordpress.org/support/users/davisgouveia/)
 * (@davisgouveia)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/adding-a-header-widget-area/)
 * Hi!
 * I want to add a header widget area to this theme and i having some problems.
 * I already added some code in functions.php but don’t know where is the right 
   place to put the rest of the code of the post i’m following in header.php
 * I want that the header to be composed by half image aligh to the left and this
   new widget area in half header aligh to the right.
 * Can you help me with this?
 * Thanks!

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

 *  Thread Starter [DavisGouveia](https://wordpress.org/support/users/davisgouveia/)
 * (@davisgouveia)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/adding-a-header-widget-area/#post-4543260)
 * With some hours serching the code already fixed this! 😉
 *  [moviezzworld](https://wordpress.org/support/users/moviezzworld/)
 * (@moviezzworld)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/adding-a-header-widget-area/#post-4543321)
 * Try to post the solution it will help others
 *  [sarveshjangid](https://wordpress.org/support/users/sarveshjangid/)
 * (@sarveshjangid)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/adding-a-header-widget-area/#post-4543480)
 * I need the same functionality (widget area in header).
    Can you please help
 *  Theme Author [Richie KS](https://wordpress.org/support/users/rkcorp/)
 * (@rkcorp)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/adding-a-header-widget-area/#post-4543481)
 * well the theme did not have header widget but if you really need one, try use
   this method.
 * *must use latest version
 * 1. create meso-custom-functions.php in your site/wp-content/
    2. copy paste this
   code into it
 *     ```
       <?php
       function dez_add_new_widgets_init() {
       register_sidebar(array(
           'name'=>__('Header', TEMPLATE_DOMAIN),
           'id' => 'header',
       	'description' => __( 'Header widget area', TEMPLATE_DOMAIN ),
       	'before_widget' => '<div id="%1$s" class="widget %2$s">',
       	'after_widget' => '</div>',
       	'before_title' => '',
       	'after_title' => '',
       	));
       }
       add_action( 'widgets_init', 'dez_add_new_widgets_init' );
   
       function dez_add_header_widget() {
       if ( is_active_sidebar( 'header' ) ) :
       dynamic_sidebar( 'header' );
       endif;
       }
       add_action('bp_after_header','dez_add_header_widget');
       ?>
       ```
   
 * formatting and css might need adjustment..

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

The topic ‘Adding a header widget area’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/mesocolumn/1.6.5.1/screenshot.
   png)
 * MesoColumn
 * [Support Threads](https://wordpress.org/support/theme/mesocolumn/)
 * [Active Topics](https://wordpress.org/support/theme/mesocolumn/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/mesocolumn/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/mesocolumn/reviews/)

 * 4 replies
 * 4 participants
 * Last reply from: [Richie KS](https://wordpress.org/support/users/rkcorp/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/adding-a-header-widget-area/#post-4543481)
 * Status: resolved