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 trial

WordPress

Andreaus Perkins
Andreaus Perkins
14,402 Points

What's the quickest way to convert a Footer widget area into a Sidebar widget area?

Following the "How to Build a WordPress Theme" section, my blog currently has a widgetable footer. I would like to move the widgets into a sidebar to the right of the main content.

What changes should be made to move the functionality of my footer to a sidebar?

The files for the project can be found here: http://teamtreehouse.com/library/how-to-build-a-wordpress-theme/extending-wordpress-template-functionality/how-to-widgetize-a-theme-2

1 Answer

Andrew McCormick
Andrew McCormick
17,730 Points

Just get the name of the sidebar in the footer area and add that code to your template file for page template you want to display it on. For example, if your sidebar in your footer is called "footer-sidebar' , then make a div for your sidebar in your template and place the code <?php dynamic_sidebar( 'footer-sidebar' ); ?>
of course you may want to adjust your css since you are probably working with a much skinner area.

Andreaus Perkins
Andreaus Perkins
14,402 Points

I'll try it and see what happens.