Title: adding a sidebar widget
Last modified: January 25, 2019

---

# adding a sidebar widget

 *  Resolved [billybob71a](https://wordpress.org/support/users/billybob71a/)
 * (@billybob71a)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/adding-a-sidebar-widget/)
 * Hi,
 * I was wondering is it possible to add a side bar to the page?
 * I have a widget to put a login/logout widget in a sidebar, but there is no place
   to add a side bar.
 * Thanks.
 * Peter
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fadding-a-sidebar-widget%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Theme Author [Anders Norén](https://wordpress.org/support/users/anlino/)
 * (@anlino)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/adding-a-sidebar-widget/#post-11129209)
 * Hi [@billybob71a](https://wordpress.org/support/users/billybob71a/),
 * No, Hitchcock doesn’t have any widget areas, unfortunately.
 * — Anders
 *  Thread Starter [billybob71a](https://wordpress.org/support/users/billybob71a/)
 * (@billybob71a)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/adding-a-sidebar-widget/#post-11131632)
 * Hi Anders,
 * Ok, thanks for your reply.
    I am a little bit new to wordpress. Do you know if
   it is possible to add widget areas?
 * Peter
 *  Theme Author [Anders Norén](https://wordpress.org/support/users/anlino/)
 * (@anlino)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/adding-a-sidebar-widget/#post-11135355)
 * [@billybob71a](https://wordpress.org/support/users/billybob71a/) It’s possible
   if you create a child theme, register a widget area in the [child theme](https://codex.wordpress.org/Child_Themes)`
   functions.php` (using [`register_sidebar()`](https://codex.wordpress.org/Function_Reference/register_sidebar))
   and output it in `index.php` and `singular.php`, but you would have to restructure
   a lot of stuff to make it work with the layout.
 *  Thread Starter [billybob71a](https://wordpress.org/support/users/billybob71a/)
 * (@billybob71a)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/adding-a-sidebar-widget/#post-11156031)
 * Ok, in my functions.php, I have:
    add_action( ‘widgets_init’, ‘petery_sidebar’);
   function petery_sidebar() { register_sidebar( array( ‘name’ => __( ‘Sidebar name’,‘
   theme_hitchcock’ ), ‘id’ => ‘sidebar-1’, ‘description’ => ”, ‘before_widget’ 
   => ”, ‘after_widget’ => ”, ‘before_title’ => ”, ‘after_title’ => ”, ) ); }
 * In index.php and singular.php , I have
    <?php get_header(); ?> <?php if ( is_active_sidebar(‘
   sidebar-1’ ) ) : ?> <ul id=”sidebar”> <?php dynamic_sidebar( ‘sidebar-1’ ); ?
   >
 * <?php endif; ?>
 * But the sidebar does not appear.
 *  Theme Author [Anders Norén](https://wordpress.org/support/users/anlino/)
 * (@anlino)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/adding-a-sidebar-widget/#post-11160018)
 * [@billybob71a](https://wordpress.org/support/users/billybob71a/) Does the widget
   area appear in Appearance → Widgets, and if it does, have you added any widgets
   to it?
 *  Thread Starter [billybob71a](https://wordpress.org/support/users/billybob71a/)
 * (@billybob71a)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/adding-a-sidebar-widget/#post-11168614)
 * Hi Anders,
    Yes, it does. Site is “[https://www.visorsourcing.com&#8221](https://www.visorsourcing.com&#8221);
   I think I am pretty close to adding the widget to where I want it. I added the
   following to functions.php. The “login/logout register” link appears in the “.
   content” area, but I want it to appear just below the Navigation bar. Do you 
   know if that is possible?
 * //Petery code, the following will add a widgetized sidebar , maybe
    function 
   wpsites_before_post_widget( $content ) { if ( is_singular( array( ‘post’, ‘page’))&&
   is_active_sidebar( ‘sidebar-1’ ) && is_main_query() ) { ?>
 * <div id=”myprefix-widget-area-wrap”><?php
    dynamic_sidebar(‘sidebar-1’); ?> </
   div> <?php } return $content; } add_filter( ‘the_content’, ‘wpsites_before_post_widget’);?
   >
 *  [jcgd](https://wordpress.org/support/users/jcgd/)
 * (@jcgd)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/adding-a-sidebar-widget/#post-11199491)
 * Hi Billy,
 * did you managed to get the sidebar widget working?
 * And I have another question if you don’t mind, what did you use to show the dropdown
   language menu? I’m using Polylang but I’m not able to show the language switcher
   widget.
 * Thank you
 *  Thread Starter [billybob71a](https://wordpress.org/support/users/billybob71a/)
 * (@billybob71a)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/adding-a-sidebar-widget/#post-11199859)
 * I did not manage to get the sidebar widget working as I wanted it. It still displays
   within the class “post-container”. For the language switcher go to “Appearance”
   > “Menus”, select the menu that you want edit and put a check on “Language Switcher”
   and then “Add to Menu”.
 * Peter
 *  [jcgd](https://wordpress.org/support/users/jcgd/)
 * (@jcgd)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/adding-a-sidebar-widget/#post-11200760)
 * I tried that before but there is no option “Language Switcher” to check as you
   can see in the following [screenshot](https://drive.google.com/open?id=1DM5pAE-BXlz8WW6Ew6CsMnJKJVJwPrSn).
 * João
 *  [jcgd](https://wordpress.org/support/users/jcgd/)
 * (@jcgd)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/adding-a-sidebar-widget/#post-11200893)
 * Ok, nevermind.
 * I was looking for it in “Appearence -> Customize -> Menus” instead of “Appearance-
   > Menus”.
 * Thanks, that worked.

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

The topic ‘adding a sidebar widget’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/hitchcock/2.2.1/screenshot.jpg)
 * Hitchcock
 * [Support Threads](https://wordpress.org/support/theme/hitchcock/)
 * [Active Topics](https://wordpress.org/support/theme/hitchcock/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/hitchcock/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/hitchcock/reviews/)

## Tags

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

 * 10 replies
 * 3 participants
 * Last reply from: [jcgd](https://wordpress.org/support/users/jcgd/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/adding-a-sidebar-widget/#post-11200893)
 * Status: resolved