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
Ty Heilman
7,797 PointsWordPress Theme - Widget Problems
I am trying to build a custom widget area in a wordPress theme. With the code I have, my admin area is showing widget areas with the default name, not the name I am giving them.
This is what it looks like:
function create_widget( $name, $id, $description ) { $args = array( 'name' => __( $name ), 'id' => $id, 'description' => $description, 'before_widget' => ' ', 'after_widget' => ' ', 'before_title' => '<h5', 'after_title' => '</h5>' ); register_sidebar ( '$args' ); }
create_widget( 'Left Footer', 'left_footer', 'Displays on the left side of the footer' ); create_widget( 'Right Footer', 'right-footer', 'Displays on the right side of the footer' );
Can anyone help me? I'm not sure what is wrong or missing..
Ty Heilman
7,797 PointsTy Heilman
7,797 PointsNevermind, I've got it.