GeoffM1968
Member
Posted 2 years ago #
How do you code widget descriptions as found with default widgets using the function.php?
<?php
function widget_mytheme_pages() {
?>
Customozed Page Widget Code here
<?php
}
if ( function_exists('register_sidebar_widget') )
register_sidebar_widget(__('Pages'), 'widget_mytheme_pages');
?>
GeoffM1968
Member
Posted 2 years ago #
Figured it out. The register_sidebar_widget built in function does not support it. Instead, the depreciated function wp_register_sidebar_widget does support this:
<?php
function widget_mytheme_tag_cloud() {
?>
Customozed Page Widget Code here
<?php
}
if ( function_exists('wp_register_sidebar_widget') )
$widget_ops = array('id' => 'tag_cloud','title' => 'Tag Cloud', 'description' => "Your most used tags in cloud format" );
wp_register_sidebar_widget($widget_ops['id'], $widget_ops['title'], 'widget_mytheme_' . $widget_ops['id'], $widget_ops);
?>