Title: DaveHS's Replies | WordPress.org

---

# DaveHS

  [  ](https://wordpress.org/support/users/davehs/)

 *   [Profile](https://wordpress.org/support/users/davehs/)
 *   [Topics Started](https://wordpress.org/support/users/davehs/topics/)
 *   [Replies Created](https://wordpress.org/support/users/davehs/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/davehs/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/davehs/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/davehs/engagements/)
 *   [Favorites](https://wordpress.org/support/users/davehs/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Can’t login to my website!](https://wordpress.org/support/topic/cant-login-to-my-website-3/)
 *  [DaveHS](https://wordpress.org/support/users/davehs/)
 * (@davehs)
 * [9 years ago](https://wordpress.org/support/topic/cant-login-to-my-website-3/#post-9072027)
 * I am getting the “ERROR: Cookies are blocked due to unexpected output.” too. 
   I’ve performed a fresh install using WP 4.3 & 4.7, and once I am done installing,
   even before I enter my login info, the wp-login page shows that msg above the
   login.
 * I’ve tried renaming the twentysixteen and twentyfifteen theme folders (so as 
   to force it to default to the twentyfourteen theme, but it’s still not letting
   me into the dashboard.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Sidebar files not appearing in “Current Widget” box](https://wordpress.org/support/topic/sidebar-files-not-appearing-in-current-widget-box/)
 *  Thread Starter [DaveHS](https://wordpress.org/support/users/davehs/)
 * (@davehs)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/sidebar-files-not-appearing-in-current-widget-box/#post-834684)
 * Disregard. The answer has been found.
 * [How to display different sidebar on different pages](http://wordpress.org/support/topic/169282?replies=20#post-829641)
 * Basically, one needs to modify the `functions.php` so as to “register” the pages.
   As to the scripting to use, see the link above.
 * :-\ Dave
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to display different sidebar on different pages ?](https://wordpress.org/support/topic/how-to-display-different-sidebar-on-different-pages/)
 *  [DaveHS](https://wordpress.org/support/users/davehs/)
 * (@davehs)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/how-to-display-different-sidebar-on-different-pages/page/2/#post-741600)
 * LOL! Talk about timing!
 * )! I appreciate you “trying to teach me to fish instead of just feeding me fish”,
   however the only problem is I am doing all this during my lunch times at work
   on the overnight shift!
 * For anyone else visting this page who is having this problem (uploaded sidebars
   not appearing in the “Current Widgets” drop down box), the short answer is you
   have to modify the “functions.php” file, and add php scripting manually to “register”
   the other sidebar php files.
 * In my case, here is what it looks like:
 *     ```
       <?php
       if ( function_exists('register_sidebars') );
   
       register_sidebar(array('name'=>'sidebar',));
       register_sidebar(array('name'=>'sidebar_about',));
       register_sidebar(array('name'=>'sidebar_news',));
       register_sidebar(array('name'=>'sidebar_george',));
       register_sidebar(array('name'=>'sidebar_dave',));
       register_sidebar(array('name'=>'sidebar_library',));
       register_sidebar(array('name'=>'sidebar_links',));
       register_sidebar(array('name'=>'sidebar_contact',)); 
   
       ?>
       ```
   
 * But in the end, again, thank you Moshu for your assistance! :-p
    Respects, Dave
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to display different sidebar on different pages ?](https://wordpress.org/support/topic/how-to-display-different-sidebar-on-different-pages/)
 *  [DaveHS](https://wordpress.org/support/users/davehs/)
 * (@davehs)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/how-to-display-different-sidebar-on-different-pages/page/2/#post-741598)
 * Thanks Moshu, tried to search that but to no avail.
 * Most posts discuss adding the same widget to multiple sidebars. The problem in
   my case, however, is that my “Current Widgets” drop down box is missing 6 of 
   the 8 sidebars I have uploaded to the server.
 * Anyone else have any ideas on how to get the missing sidebar php’s to show up
   in the “current widgets” drop down box?
 * Thanks, Dave
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to display different sidebar on different pages ?](https://wordpress.org/support/topic/how-to-display-different-sidebar-on-different-pages/)
 *  [DaveHS](https://wordpress.org/support/users/davehs/)
 * (@davehs)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/how-to-display-different-sidebar-on-different-pages/#post-741596)
 * Ok, after a little more digging, I was finally able to find the solutions to 
   my 1st set of questions, that being what would be the format of the PHP scripting
   required to get each page to have it’s own side bar, & what *.php document to
   modify it in.
 * Q1: Thanks to someone else reporting the issue ([Custom sidebar per page](http://wordpress.org/support/topic/190100?replies=6)),
   I was able to figure out that this is how part of the scripting would look in
   my case:
 *     ```
       } elseif (is_page()) {
               // we're looking at a static page.  Which one?
               if (is_page('About')) {
                    // our about page.
                    include(TEMPLATEPATH . '/sidebar_about.php');
               } elseif (is_page('3')) {
                    include(TEMPLATEPATH . '/sidebar_news.php');
               } elseif (is_page('5')) {
                    include(TEMPLATEPATH . '/sidebar_george.php');
               } elseif (is_page('6')) {
                    include(TEMPLATEPATH . '/sidebar_dave.php');
               } elseif (is_page('8')) {
                    include(TEMPLATEPATH . '/sidebar_library.php');
               } elseif (is_page('10')) {
                    include(TEMPLATEPATH . '/sidebar_links.php');
               } elseif (is_page('7')) {
                    include(TEMPLATEPATH . '/sidebar_contact.php');
               } else {
                     // catch-all for other pages
                    include(TEMPLATEPATH . '/sidebar.php');        }
       ```
   
 * Q2: As to what document to modify, it is the actual file acting as the primary“
   sidebar.php”, as dictated by what is in “page.php”
 * Now, however, my 2nd set of questions regarding widgets come into play.
 * When in the “Design/Widgets” site admin screen, the “Current Widgets” box on 
   the right hand side of the page does not list all the sidebar php pages I have
   uploaded in my theme directory. How do I get all my other uploaded sidebar files
   such as “sidebar_george.php”, “sidebar_dave.php”, etc, to be added to that list?
 * Inching my way forward! Sorry for my newbie-ness! I love WP 2.6, but it’s taking
   a lot of getting used to! :-p
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to display different sidebar on different pages ?](https://wordpress.org/support/topic/how-to-display-different-sidebar-on-different-pages/)
 *  [DaveHS](https://wordpress.org/support/users/davehs/)
 * (@davehs)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/how-to-display-different-sidebar-on-different-pages/#post-741595)
 * Thanks Moshu.
 * I read that, and I was aware of all of it, and what I was referring to was the
   difference between the older version of WP I was using (I don’t recall which 
   one it was) & this one. I actually enjoy the fact that I can modify my pages 
   now directly in the admin panel, but the point I was trying to make is where 
   to go to modify each to display it’s own sideabar & more importantly, what exactly
   to write (as everything I know, most being HTML & XML, has been self taught, 
   and I am not totally fluent in PHP yet).
 * My questions remain the same, what to write, and which file to modify. Thanks
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to display different sidebar on different pages ?](https://wordpress.org/support/topic/how-to-display-different-sidebar-on-different-pages/)
 *  [DaveHS](https://wordpress.org/support/users/davehs/)
 * (@davehs)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/how-to-display-different-sidebar-on-different-pages/#post-741593)
 * Hello all;
 * Sorry in advance if this sounds either repetative or uninformed, but I too am
   a WP newbie, and it seems multiple issues are being discussed above, and having
   just gotten used to being able to work with “different sidebars on different 
   pages” in an older version of WP, I am now totally lost! I can’t even find what
   sub folder the pages are actually stored in! If someone could provide a “laymen”
   explanation, I would be so ever indebted! :-p
 * For ease of explanation, I am working on [http://firefoxnewsonline.net](http://firefoxnewsonline.net).
 * Basically, what I want to do is have each “page” (aside from the “home” page)
   display a different sidebar (ie: sidebar_george.php, sidebar_dave.php, sidebar_library.
   php, sidebar_contact.php, etc). That said, i think I’ve figured out I have to
   add a “elseif” php script, though I am not sure exactly how to word it, and more
   importantly, which “.php” I need to add it to (page.php, template.php, etc), 
   etc.
 * But based on what I read above, I guess I now have a 2nd question, once I get
   the 1st one resolved of course! Some of the pages I want to have different sidebars
   for will also have different widgets. For example may have a polling widget, 
   whereas another will have a youtube widget. Is this possible, and if so, what
   text do I have to add to what page?
 * Again, sorry for my “layman” lameness, but struggling to figure this out! Thanks
   in advance for any assistance anyone provides.
 * Respects
    Dave

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