Title: adding topbar widget area
Last modified: June 1, 2020

---

# adding topbar widget area

 *  Resolved [gentle2309](https://wordpress.org/support/users/gentle2309/)
 * (@gentle2309)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/adding-topbar-widget-area/)
 * Hi, i need help, i have a wordpress theme with top bar but with no topbar widget
   area , i go to the customize > Layout > topbar > then there is only text place,
   i can add text but i can not add html code because places in topbar are not widget
   please help .
 * thank you
 * here is topbar.php file
 * <?php
    /** * Topbar * * [@package](https://wordpress.org/support/users/package/)
   woostify */
 * // Default values.
    $defaults = woostify_options();
 * // Display topbar.
    $wp_customize->add_setting( ‘woostify_setting[topbar_display]’,
   array( ‘type’ => ‘option’, ‘default’ => $defaults[‘topbar_display’], ‘sanitize_callback’
   => ‘woostify_sanitize_checkbox’, ) ); $wp_customize->add_control( new Woostify_Switch_Control(
   $wp_customize, ‘woostify_setting[topbar_display]’, array( ‘label’ => __( ‘Topbar
   Display’, ‘woostify’ ), ‘section’ => ‘woostify_topbar’, ‘settings’ => ‘woostify_setting[
   topbar_display]’, ) ) );
 * // Topbar color.
    $wp_customize->add_setting( ‘woostify_setting[topbar_text_color]’,
   array( ‘default’ => $defaults[‘topbar_text_color’], ‘sanitize_callback’ => ‘sanitize_hex_color’,‘
   type’ => ‘option’, ‘transport’ => ‘postMessage’, ) ); $wp_customize->add_control(
   new WP_Customize_Color_Control( $wp_customize, ‘woostify_setting[topbar_text_color]’,
   array( ‘label’ => __( ‘Text Color’, ‘woostify’ ), ‘section’ => ‘woostify_topbar’,‘
   settings’ => ‘woostify_setting[topbar_text_color]’, ) ) );
 * // Background color.
    $wp_customize->add_setting( ‘woostify_setting[topbar_background_color]’,
   array( ‘default’ => $defaults[‘topbar_background_color’], ‘sanitize_callback’
   => ‘woostify_sanitize_rgba_color’, ‘type’ => ‘option’, ‘transport’ => ‘postMessage’,));
   $wp_customize->add_control( new Woostify_Color_Control( $wp_customize, ‘woostify_setting[
   topbar_background_color]’, array( ‘label’ => __( ‘Background Color’, ‘woostify’),‘
   section’ => ‘woostify_topbar’, ‘settings’ => ‘woostify_setting[topbar_background_color]’,)));
 * // Space.
    $wp_customize->add_setting( ‘woostify_setting[topbar_space]’, array(‘
   default’ => $defaults[‘topbar_space’], ‘sanitize_callback’ => ‘absint’, ‘type’
   => ‘option’, ‘transport’ => ‘postMessage’, ) ); $wp_customize->add_control( new
   Woostify_Range_Slider_Control( $wp_customize, ‘woostify_setting[topbar_space]’,
   array( ‘label’ => __( ‘Space’, ‘woostify’ ), ‘section’ => ‘woostify_topbar’, ‘
   settings’ => array( ‘desktop’ => ‘woostify_setting[topbar_space]’, ), ‘choices’
   => array( ‘desktop’ => array( ‘min’ => apply_filters( ‘woostify_topbar_min_step’,
   0 ), ‘max’ => apply_filters( ‘woostify_topbar_max_step’, 50 ), ‘step’ => 1, ‘
   edit’ => true, ‘unit’ => ‘px’, ), ), ) ) );
 * // Content divider.
    $wp_customize->add_setting( ‘topbar_content_divider’, array(‘
   sanitize_callback’ => ‘sanitize_text_field’, ) ); $wp_customize->add_control(
   new Woostify_Divider_Control( $wp_customize, ‘topbar_content_divider’, array(‘
   section’ => ‘woostify_topbar’, ‘settings’ => ‘topbar_content_divider’, ‘type’
   => ‘divider’, ) ) );
 * // Topbar left.
    $wp_customize->add_setting( ‘woostify_setting[topbar_left]’,
   array( ‘default’ => $defaults[‘topbar_left’], ‘sanitize_callback’ => ‘woostify_sanitize_raw_html’,‘
   type’ => ‘option’, ‘transport’ => ‘postMessage’, ) ); $wp_customize->add_control(
   new WP_Customize_Control( $wp_customize, ‘woostify_setting[topbar_left]’, array(‘
   label’ => __( ‘Content Left’, ‘woostify’ ), ‘section’ => ‘woostify_topbar’, ‘
   settings’ => ‘woostify_setting[topbar_left]’, ‘type’ => ‘textarea’, ) ) );
 * // Topbar center.
    $wp_customize->add_setting( ‘woostify_setting[topbar_center]’,
   array( ‘default’ => $defaults[‘topbar_center’], ‘sanitize_callback’ => ‘woostify_sanitize_raw_html’,‘
   type’ => ‘option’, ‘transport’ => ‘postMessage’, ) ); $wp_customize->add_control(
   new WP_Customize_Control( $wp_customize, ‘woostify_setting[topbar_center]’, array(‘
   label’ => __( ‘Content Center’, ‘woostify’ ), ‘section’ => ‘woostify_topbar’,‘
   settings’ => ‘woostify_setting[topbar_center]’, ‘type’ => ‘textarea’, ) ) );
 * // Topbar right.
    $wp_customize->add_setting( ‘woostify_setting[topbar_right]’,
   array( ‘default’ => $defaults[‘topbar_right’], ‘sanitize_callback’ => ‘woostify_sanitize_raw_html’,‘
   type’ => ‘option’, ‘transport’ => ‘postMessage’, ) ); $wp_customize->add_control(
   new WP_Customize_Control( $wp_customize, ‘woostify_setting[topbar_right]’, array(‘
   label’ => __( ‘Content Right’, ‘woostify’ ), ‘section’ => ‘woostify_topbar’, ‘
   settings’ => ‘woostify_setting[topbar_right]’, ‘type’ => ‘textarea’, ) ) );
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fadding-topbar-widget-area%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Thread Starter [gentle2309](https://wordpress.org/support/users/gentle2309/)
 * (@gentle2309)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/adding-topbar-widget-area/#post-12921375)
 * I found a solution

Viewing 1 replies (of 1 total)

The topic ‘adding topbar widget area’ is closed to new replies.

## Tags

 * [topbar](https://wordpress.org/support/topic-tag/topbar/)
 * [widget](https://wordpress.org/support/topic-tag/widget/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [gentle2309](https://wordpress.org/support/users/gentle2309/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/adding-topbar-widget-area/#post-12921375)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
