PDA

View Full Version : Sidebar Issues (Again)


4clubbs
09-02-2007, 09:30 PM
I've changed my theme and again have managed to somehow have my sidebar showing up at the bottom of my blog.

I am using Wordpress.

Here is the weird thing:

When you view my "About" page, the sidebar is where it should be.

BUT

On my regular page, it shows up at the bottom of all my posts.

Can anyone help a brother out? I'm so confused. Thanks a bunch!

The last time I did this, I totally deleted my blog and started again. But then, my blog was 3 days old instead of 3 weeks old. I'm really hoping for a less drastic fix this time.

Michael Martin
09-02-2007, 09:50 PM
Emm.... I have refreshed the page 4 times in a row there, and I got a different design each time! I take it you're playing with it at the minute? xD

Anyways, it usually just means that something in your main content is too wide, and is forcing the sidebar beneath the main content. Just find the culprit now. :)

4clubbs
09-02-2007, 09:56 PM
Michael, you caught me. I've stopped messing with it now if you'd like to take another look. Thanks!

Michael Martin
09-02-2007, 10:08 PM
lol - It was quite funny to see. :D

Anyways, I've spotted the problem. You've actually put your sidebar inside your main content (#right is inside #left). If you just take it out, the problem will be sorted. :)

4clubbs
09-02-2007, 10:20 PM
OK now I'm not having one of my brightest days... Is this something that I need to fix in the "stylesheet?"

Where will I go to take #right out of #left?

Michael Martin
09-02-2007, 10:23 PM
I've replied to your PM. If you paste whatever is in your sidebar.php, I'll show ya. :)

4clubbs
09-02-2007, 10:26 PM
I am singing "You Are the Wind Beneath My Wings" as I do this.... :)

<div id="right">

<?php if (function_exists('dynamic_sidebar') && dynamic_sidebar(1) ) : else : ?>

<h2>Categories</h2>
<ul><?php wp_list_cats('sort_column=name&hierarchical=0'); ?></ul>

<h2>Archives</h2>
<ul><?php wp_get_archives('type=monthly'); ?></ul>

<h2>Links</h2>
<ul><?php get_links('-1','<li>','</li>'); ?></ul>

<h2>Meta</h2>
<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<li><a href="http://validator.w3.org/check/referer" title="This page validates as XHTML 1.0 Transitional">Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr></a></li>
<li><a href="http://gmpg.org/xfn/"><abbr title="XHTML Friends Network">XFN</abbr></a></li>
<li><a href="http://wordpress.org/" title="Powered by WordPress, state-of-the-art semantic personal publishing platform.">WordPress</a></li>
<?php wp_meta(); ?>
</ul>

<?php endif; ?>

</div><!--end:right-->

Michael Martin
09-02-2007, 10:31 PM
Sorry, I've asked for the wrong file. I wasn't thinking straight. xD

The one we're after is going to be index.php (Main Index Template). It will have this line in it: "<?php get_sidebar(); ?>" but in the wrong place. :)

4clubbs
09-02-2007, 10:36 PM
OK here's my index.php

<?php get_header(); ?>

<!-- ///CONTENT STARTS HERE/// -->

<div id="contentcontainer">

<div id="left">

<?php if (have_posts()) : ?>

<?php while (have_posts()) : the_post(); ?>

<div class="post" id="post-<?php the_ID(); ?>">

<h1><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h1>
<div class="postmeta">Posted on <?php the_time('j F Y') ?> by <?php the_author() ?> in <?php the_category(', ') ?></div>
<div class="entry">

<div class="commentbutton"><?php comments_popup_link('Comments (0)', 'Comments (1)', 'Comments (%)'); ?></div>
<div style="clear:both;"></div>

<?php the_content('Read the rest of this entry &raquo;'); ?>

</div><!--end:leftbox - Entry-->

</div><!--end:post - Post-->

<?php endwhile; ?>

<div style="clear:both;height:30px;"></div>

<div class="navigation">
<div class="alignleft"><?php next_posts_link('&laquo; Previous Entries') ?></div>
<div class="alignright"><?php previous_posts_link('Next Entries &raquo;') ?></div>
</div>

<?php endif; ?>

</div><!--end:left-->

<?php get_sidebar(); ?>

</div><!--end:contentcontainer-->

<!-- ///CONTENT ENDS HERE/// -->

<?php get_footer(); ?>

Michael Martin
09-02-2007, 10:51 PM
That file is actually right. The problem is still what I originally said it was, but it's not your template causing it. It's your latest post. It has no </div> at its end. (So the single post pages for all of your other pages still work. :) )

Do you edit the code of your posts? :?

4clubbs
09-02-2007, 10:52 PM
Hmmm. No. Let me go look at that.

4clubbs
09-02-2007, 10:58 PM
Did you ever know that you're my hero,
and everything I would like to be?
I can fly higher than an eagle,
for you are the wind beneath my wings.

You fixed it!

Dropped you a little link love in appreciation!

Thank you SO MUCH!

Michael Martin
09-02-2007, 11:00 PM
lmao - Well no-one has ever sung to me for helping them before!! You have quite a voice there. ;)

Glad it's fixed, and thanks for the link love! That was very nice of ya. :D