Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Sidebar only shows up on Blog page
For some reason, my Sidebar only appears on the Blog page. I ran all my code through HTML and PHP validators, but was unable to figure out what I'm doing wrong.
The PHP validator gave me the following error message: "Sidebars need to be registered in a custom function hooked to the widgets_init action. See: register_sidebar()."
Can anyone give me advice as to what specific PHP files I should be focusing on, to correct the issue?
Thanks in advance.
Paulius Vitkus24,230 Points
Could you paste your register_sidebar() code there? According to error, there is something wrong with sidebar registering.
In my case, the Sidebar appeared at the very bottom of the "uncategorized" page. I had to add a missing closing tag </div> after "?php get_sidebar(); ?" on line 47 (archive.php file) in order for the Sidebar to show up properly on that page. Try and see if it helps you as well.