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! While you're at it, check out some resources Treehouse students have shared here.
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 trialKonrad Pilch
2,435 PointsMy sidebar doesnt display as i want
HI,
So im making Wordpress theme, im just fresh from finishing the Bootstrap to WP with Zac, and now im making the same but with little help form the video and i have a problem where only one sidebar displays.
<?php get_sidebar( 'blog' ); ?> <?php get_sidebar( 'page' ); ?>
and my naming are sidebar-blog and sidebar-page with .php endings but it displays only one sidebar in all pages, instead of displaying the right one, int the right page.
2 Answers
Konrad Pilch
2,435 PointsI found it! I re-watched your video at college , jsut looking and i missed out that you had the blog page , in settings, set to Blog.
So select the blog page and then in the settings, readings, and set post pages to blog. Yay .
Thank you for your response and other help :D its to easy to learn WordPress with you :D
Zac Gordon
Treehouse Guest TeacherYou will have to write some conditional code telling it what sidebar to display when. Can you post up the code you're using to include the sidebars?
Zac Gordon
Treehouse Guest TeacherZac Gordon
Treehouse Guest TeacherYay! Glad you found it :)