WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Whitescreen at Admin pages after widgetizing theme (2 posts)

  1. whiteplainsny
    Member
    Posted 3 years ago #

    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>
  2. whiteplainsny
    Member
    Posted 3 years ago #

    Nevermind, I resolved the issue. I had a space at the end of my functions.php file. Wow.

Topic Closed

This topic has been closed to new replies.

About this Topic