en en en en de en id en en en en en en en en en en en la en la en en en en en en en en de en en en en en en en en zh en en en en en en en en en en en en en en az en en en
WordPress Widget-Areas with Description - WP Engineer
WordPress News, Hacks, Tips, Tutorials, Plugins and Themes
Using WordPress version 2.9, there is now a possibility that we can write more detailed description for the widget areas. This is especially interesting when you define different widget areas, depending of categories or because the theme author defines various widget areas, that allows adjustments in more areas than just the sidebar. I do this for example in the theme Greyfoto, where the footer area is also equipped with widgets.
In the following example code we define a widget area, called My Lorem Ipsum Sidebar, which contains „detailed“ information.
if ( function_exists('register_sidebar') ) { register_sidebar(array( 'name' => 'My Lorem Ipsum Sidebar', 'description' => __('Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.', 'your_textdomain'), 'before_widget' => ' ', 'after_widget' => ' ', 'before_title' => ' ', 'after_title' => ' ', )); }
A more comprehensive example with two widget areas, one area for the sidebar and an area for the footer.
if ( function_exists('register_sidebar') ) { register_sidebar(array( 'id' => 'sidebar', 'name' => 'My Lorem Ipsum Sidebar', 'description' => __('Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.', 'your_textdomain'), 'before_widget' => ' ', 'after_widget' => ' ', 'before_title' => ' ', 'after_title' => ' ', )); register_sidebar(array( 'id' => 'footer', 'name' => 'My Lorem Ipsum Footer', 'description' => __('Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.', 'your_textdomain'), 'before_widget' => ' ', 'after_widget' => ' ', 'before_title' => ' ', 'after_title' => ' ', )); }
This may be used as follows in the templates, it’s being used in the footer.php of the widget area My Lorem Ipsum Footer.
Tagged Advent Calendar Theme WordPress WP wp2.9
Webworker by passion, works with priority in WordPress, developing Plugins, themes and solutions. Frank writes in German language on his private blog bueltge.de [by:ltge.de]. He is member of WordPress Germany and writes about news in WordPress Deutschland blog and is author of a book for WordPress.
MarkusDecember 23, 2009 @ 11:28 am
danke für den tip
Thanks for the tip
Matt BridgesDecember 23, 2009 @ 11:09 pm
Oh, beautiful. I have been having trouble figuring out exactly how to implement individual sidebars. Great tip!
MibasterJanuary 1, 2010 @ 2:44 pm
Awesome, and easy! Thanks for sharing.
kyleMarch 8, 2010 @ 11:29 pm
i had no idea i could add descriptions – lovely!
Collins Agbonghama on Customizing the User Registration Notification eMails
Amit kumar on Download older plugin versions from wordpress.org
Bakeca Incontri Milano on Download older plugin versions from wordpress.org
PURNA on Download older plugin versions from wordpress.org
Girish Chouhan on Download older plugin versions from wordpress.org
Admin Bar advent Advent Calendar backend cache Code comments Constants CSS Design development Feed gallery hack JavaScript Multilanguage Multisite navigation options Pagination PHP Plugin RSS Search security Shortcode Sponsor template tag template_tag Theme update Widget Widget API WordPress WordPress Hacks WordPress Plugins WordPress Themes WordPress Tutorials WP wp2.7 wp2.8 wp2.9 WP3.0 wp3.1 Xtreme One
© 2022 A MarketPress Theme