I am creating a WP-theme, and run into a problem. I want to have dynamic sidebars with widgets, and therefore created sidebar.php like this
<?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar()) : ?>
<?php endif; ?>
And in functions.php i wrote this
<?php
if (function_exists('register_sidebar'))
register_sidebar();
?>
Now, wordpress says on the "Themes" page that under functions, widgets is available, but when i navigate to the widgets-section i get the error "No sidebars defined". In my index.php i have added the line "get_sidebar()".
What could cause this, and how do i solve it?