Du vergibst in der functions.php noch den Namen der Sidebar:
<?php
if ( function_exists('register_sidebar') )
register_sidebar(array(
[COLOR=Red]'name' => 'Main Sidebar',[/COLOR]
'before_widget' => '<li id="%1$s" class="widget %2$s">',
'after_widget' => '</li>',
'before_title' => '<h2 class="widgettitle">',
'after_title' => '</h2>',
));
?>
und in der sidebar.php musst du dann die function dynamic_sidebar abfragen:
<div id="sidebar">
[COLOR=Red]<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('Main Sidebar') ) : else : ?>[/COLOR]
<ul>
<?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?>
<li><h2>Archives</h2>
<ul>
<?php wp_get_archives('type=monthly'); ?>
</ul>
</li>
<?php wp_list_categories('show_count=1&title_li=<h2>Categories</h2>'); ?>
<?php if ( is_home() || is_page() ) { ?>
<?php wp_list_bookmarks(); ?>
<li><h2>Admin</h2>
<ul>
<li><?php wp_register(); ?></li>
<li><?php wp_loginout(); ?></li>
<li><a title="Powered by WordPress" target="_blank" href="http://www.wordpress.org">WordPress</a></li>
<?php wp_meta(); ?>
</ul>
</li>
<?php if (function_exists('useronline')): ?>
<li>
<h2>UserOnline</h2>
<ul>
<li><div id="useronline-count"><?php get_useronline(); ?></div></li>
</ul>
</li>
<?php endif; ?>
<?php } ?>
</ul>
[COLOR=Red]<?php endif; ?> [/COLOR]
</div>
Alles anzeigen