[wp-trac] [WordPress Trac] #11387: Walker Widget System
WordPress Trac
wp-trac at lists.automattic.com
Thu Dec 10 17:34:10 UTC 2009
#11387: Walker Widget System
-------------------------+--------------------------------------------------
Reporter: ShaneF | Owner: azaozz
Type: enhancement | Status: new
Priority: normal | Milestone: 3.0
Component: Widgets | Version:
Severity: normal | Keywords:
-------------------------+--------------------------------------------------
Comment(by ShaneF):
This is all I do to register the sidebars:
{{{
if ( function_exists('register_sidebar') ) {
register_sidebar( array(
'id' => 'top-sidebar',
'name' => __("Top Sidebar"),
'description' => __("This sidebar will always be
shown, no matter what page.")
)
);
register_sidebar( array(
'id' => 'primary-sidebar',
'name' => __("Primary Sidebar"),
'description' => __("Sidebar for Posts and Pages")
)
);
register_sidebar( array(
'id' => 'project-sidebar',
'name' => __("Project Sidebar"),
'description' => __("Sidebar for Project Page
Only")
)
);
register_sidebar( array(
'id' => 'archive-sidebar',
'name' => __("Archive Sidebar"),
'description' => __("Sidebar for Archives Page
Only")
)
);
}
}}}
This makes it very clean and you don't have to worry about hardcoding the
CSS/Design into this function.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11387#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list