My theme is broken, help!
-
Hello all,
I’ve been trying to get my theme to function correctly for days now. Everything works fine, except whenever I search for anything, or click my left sidebar links (which are linked to categories), my exterior border doesn’t refill around all the content. Also, my right sidebar is called a second time and stretches the width of the page below all the existing content. I’ve gone over and over my code repeatedly to no avail. You can go to the page at blog.noelmarie.com to see. Try the left sidebar links or try to search, you’ll see what I mean. I’ve tried to validate the page after this error, but I don’t know how to fix the errors within all my template files. I did notice that “div class navigation” is on some files twice, and I believe I’ve narrowed it down to either my Main Index Template, Search, Archives, or Footer. Here is code from those, if it helps. I’m going live with this next Monday and am really starting to panic, so any help would be fantastic!
Main Index:
<?php get_header(); ?> <div class="contentLayout"> <div class="sidebar1"> <?php include (TEMPLATEPATH . '/sidebar1.php'); ?> </div> <div class="content"> <div class="Block"> <div class="Block-body"> <div class="BlockContent"> <div class="BlockContent-body"> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Older Entries') ?></div> <div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div> </div> <?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php endif; ?> </div> </div> </div> </div> <?php get_footer(); ?>
Search:
<?php get_header(); ?> <div class="contentLayout"> <div class="sidebar1"> <?php include (TEMPLATEPATH . '/sidebar1.php'); ?> </div> <div class="content"> <div class="Block"> <div class="Block-body"> <div class="BlockHeader"> Search Results <div class="l"></div> <div class="r"><div></div></div> </div> <div class="BlockContent"> <div class="BlockContent-body"> <?php if (have_posts()) : ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Older Entries') ?></div> <div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div> </div> <?php while (have_posts()) : the_post(); ?> <div class="post"> <h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3> <small><?php the_time('l, F jS, Y') ?></small> <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Older Entries') ?></div> <div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div> </div> <?php else : ?> <h2 class="center">No posts found. Try a different search?</h2> <?php endif; ?> </div> <div class="BlockContent-tl"></div> <div class="BlockContent-tr"><div></div></div> <div class="BlockContent-bl"><div></div></div> <div class="BlockContent-br"><div></div></div> <div class="BlockContent-tc"><div></div></div> <div class="BlockContent-bc"><div></div></div> <div class="BlockContent-cl"><div></div></div> <div class="BlockContent-cr"><div></div></div> <div class="BlockContent-cc"></div> </div> </div> </div> </div> </div> <?php get_footer(); ?>
Archives:
<?php get_header(); ?> <div class="contentLayout"> <div class="sidebar1"> <?php include (TEMPLATEPATH . '/sidebar1.php'); ?> </div> <div class="content"> <div class="Block"> <div class="Block-body"> <div class="BlockContent"> <div class="BlockContent-body"> <?php is_tag(); ?> <?php if (have_posts()) : ?> <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?> <?php /* If this is a category archive */ if (is_category()) { ?> <h2 class="pagetitle">Archive for the ‘<?php single_cat_title(); ?>’ Category</h2> <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?> <h2 class="pagetitle">Posts Tagged ‘<?php single_tag_title(); ?>’</h2> <?php /* If this is a daily archive */ } elseif (is_day()) { ?> <h2 class="pagetitle">Archive for <?php the_time('F jS, Y'); ?></h2> <?php /* If this is a monthly archive */ } elseif (is_month()) { ?> <h2 class="pagetitle">Archive for <?php the_time('F, Y'); ?></h2> <?php /* If this is a yearly archive */ } elseif (is_year()) { ?> <h2 class="pagetitle">Archive for <?php the_time('Y'); ?></h2> <?php /* If this is an author archive */ } elseif (is_author()) { ?> <h2 class="pagetitle">Author Archive</h2> <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?> <h2 class="pagetitle">Blog Archives</h2> <?php } ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Older Entries') ?></div> <div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div> </div> <?php while (have_posts()) : the_post(); ?> <div class="post"> <h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3> <small><?php the_time('l, F jS, Y') ?></small> <div class="entry"> <?php the_content() ?> </div> <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Older Entries') ?></div> <div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div> </div> <?php else : ?> <h2 class="center">Not Found</h2> <?php endif; ?> </div> <div class="BlockContent-tl"></div> <div class="BlockContent-tr"><div></div></div> <div class="BlockContent-bl"><div></div></div> <div class="BlockContent-br"><div></div></div> <div class="BlockContent-tc"><div></div></div> <div class="BlockContent-bc"><div></div></div> <div class="BlockContent-cl"><div></div></div> <div class="BlockContent-cr"><div></div></div> <div class="BlockContent-cc"></div> </div> </div> </div> </div> <div class="sidebar2"> <?php include (TEMPLATEPATH . '/sidebar2.php'); ?> </div> </div> <?php get_footer(); ?>
Footer:
</div> <div class="sidebar2"> <?php include (TEMPLATEPATH . '/sidebar2.php'); ?> </div> </div> </div> <div class="Sheet-tl"></div> <div class="Sheet-tr"><div></div></div> <div class="Sheet-bl"><div></div></div> <div class="Sheet-br"><div></div></div> <div class="Sheet-tc"><div></div></div> <div class="Sheet-bc"><div></div></div> <div class="Sheet-cl"><div></div></div> <div class="Sheet-cr"><div></div></div> <div class="Sheet-cc"></div> </div> <div id="footer"> <!-- If you'd like to support WordPress, having the "powered by" link somewhere on your blog is the best way; it's our only promotion or advertising. --> <p>Designed by CVB.<br /> <a href="<?php bloginfo('rss2_url'); ?>">Entries (RSS)</a> and <a href="<?php bloginfo('comments_rss2_url'); ?>">Comments (RSS)</a>. <!-- <?php echo get_num_queries(); ?> queries. <?php timer_stop(1); ?> seconds. --></p> </div> </div> </div> <?php wp_footer(); ?> </body> </html>
Again, thanks to anyone who can help me!
- The topic ‘My theme is broken, help!’ is closed to new replies.