Title: Adding widget areas
Last modified: August 20, 2016

---

# Adding widget areas

 *  [bluedrag](https://wordpress.org/support/users/bluedrag/)
 * (@bluedrag)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/adding-widget-areas/)
 * I’m trying to add a widget area to my theme, but it doesn’t seem to be working.
   I’ve added widget areas to wordpress themes many many times before and I’ve never
   had a problem with them… I have no idea why it’s not working this time, here 
   is the code I’m using..
 * functions.php
 *     ```
       <?php
       if (function_exists('register_sidebar')) {
   
       	register_sidebar(array(
       		'name' => 'navbar',
       		'description'   => '',
       		'before_widget' => '',
       		'after_widget'  => '',
       		'before_title'  => '',
       		'after_title'   => ''
       	));
   
       ?>
       ```
   
 * header.php
 *     ```
       <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('navbar')) : ?>
       <?php endif; ?>
       ```
   
 * side note: I dont get a php error or anything, nothing happens.

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

 *  Moderator [Kathryn Presner](https://wordpress.org/support/users/zoonini/)
 * (@zoonini)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/adding-widget-areas/#post-2330749)
 * You’re missing your closing curly brace in the function:
 *     ```
       <?php
       if (function_exists('register_sidebar')) {
   
       	register_sidebar(array(
       		'name' => 'navbar',
       		'description'   => '',
       		'before_widget' => '',
       		'after_widget'  => '',
       		'before_title'  => '',
       		'after_title'   => ''
       	));
   
       ?>
       ```
   
 *  Thread Starter [bluedrag](https://wordpress.org/support/users/bluedrag/)
 * (@bluedrag)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/adding-widget-areas/#post-2330849)
 * Hmm.. it still doesn’t seem to be working. Is this what you meant?
 *     ```
       <?php
       if (function_exists('register_sidebar')) {
   
       	register_sidebar(array(
       		'name' => 'navbar',
       		'description'   => '',
       		'before_widget' => '',
       		'after_widget'  => '',
       		'before_title'  => '',
       		'after_title'   => ''
       	));
       }
   
       ?>
       ```
   
 *  Moderator [Kathryn Presner](https://wordpress.org/support/users/zoonini/)
 * (@zoonini)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/adding-widget-areas/#post-2330854)
 * Why don’t you paste the entire contents of functions.php into a [Pastebin](http://pastebin.com/).
 *  Moderator [Kathryn Presner](https://wordpress.org/support/users/zoonini/)
 * (@zoonini)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/adding-widget-areas/#post-2330855)
 * Actually, never mind – I think it’s something else. Do you have a line in header.
   php actually calling in the widget?
 * `<?php dynamic_sidebar( 'navbar' ); ?>`

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

The topic ‘Adding widget areas’ is closed to new replies.

## Tags

 * [custom theme](https://wordpress.org/support/topic-tag/custom-theme/)
 * [widget area](https://wordpress.org/support/topic-tag/widget-area/)
 * [widgetize](https://wordpress.org/support/topic-tag/widgetize/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [Kathryn Presner](https://wordpress.org/support/users/zoonini/)
 * Last activity: [14 years, 7 months ago](https://wordpress.org/support/topic/adding-widget-areas/#post-2330855)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
