Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

WordPress From Bootstrap to WordPress Create Bootstrap Styled Theme Templates Adding Widget Areas to the Front Page

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 90,705 Points

Widget names show up as Sidebar 1, 2 and 3

Hi all,

I'm using Wordpress 4.4, and going through the video. I'm not sure if anything is actually broken but in my list of widgets Zac has them in the video as Front Page Left, Front Page Center and Front Page Right.

So when I go into Appearance - Themes of the admin area.... On mine they say Sidebar 1, Sidebar 2 and Sidebar 3 but seem to pull in the widget short description.

Here's my code.

function create_widget($name, $id, $description) {
    register_sidebar(array(
        'nameOfWidget' => ($name),  
        'id' => ($id),  
        'description' => ($description),
        'before_widget' => '<div class="widget">',
        'after_widget' => '</div>',
        'before_title' => '<h3>',
        'after_title' => '</h3>'        
    ));
}
//give the widget a name, a unique identifer and short description
create_widget('Front Page Left','front-left','Displays on the left of the home page');
create_widget('Front Page Center','front-center','Displays on the center of the home page');
create_widget('Front Page Right','front-right','Displays on the right of the home page');

Is this a bug or just the way 4.4 works now? :) Thanks

1 Answer