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 From Bootstrap to WordPress Create Bootstrap Styled Theme Templates Adding Widget Areas to the Front Page

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,252 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