I am new to wordpress and have been struggling through creating my own theme. Everything seemed to be going well until I coded the sidebar and widgetized it. The site works perfectly, but in the admin screens, if I post a new post or update a post, I am lead to a blank, white screen. I know that it is due to my theme because when I removed it, I did not get the white screen anymore. I have no plugins installed. What could I have done wrong?
this is the code I added to the functions.php file:
<?php
if ( function_exists('register_sidebar') )
register_sidebar();
?>
and this is the code I used for my sidebar:
<div id="sidebar">
<?php if ( !function_exists('dynamic_sidebar') ||
!dynamic_sidebar() ) : ?>
<ul>
<!-- Search -->
<li id="search" class="widget">
<?php include(TEMPLATEPATH.'/searchform.php'); ?>
</li>
<!-- Recent Posts -->
<li class="widget">
<h2>Recent Posts</h2>
<ul>
<?php
$recent = new WP_Query();
$recent -> query('showposts=7');
while($recent -> have_posts()) : $recent ->the_post(); ?>
<li><a href="<?php the_permalink(); ?>"
title="<?php the_title(); ?>"><?php the_title(); ?></a></li>
<?php endwhile; ?>
</ul>
</li>
<!-- Archives -->
<li id="archives" class="widget">
<h2>Archives</h2>
<ul><?php wp_get_archives('type=monthly&limit=7'); ?></ul>
</li>
<!-- Categories -->
<li id="categories" class="widget">
<h2>Categories</h2>
<ul>
<?php wp_list_categories('title_li=&orderby=name'); ?>
</ul>
</li>
</ul>
<?php endif; ?>
</div>