• I’m in dire need of some help. I can’t figure this out. On my main page the sidebars are fine. But on my other pages my sidebars are below the text. Could someone please help me.
    https://www.Lancesview.com
    I will post my comments.php and index.php and page.php below.
    Thanks,
    Lance

    Index.php:

    <?php get_header(); ?>
    
    <!-- CONTENT -->
    
      <div id="content-wrapper">
        <div id="content">
    
    <a href="#bottom">Bottom of Page</a>
    
    <div style="height:8px;"></div>
    
        	<?php if (have_posts()) : ?>
        		<?php while (have_posts()) : the_post(); ?>
        			<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e('Permanent Link to ','emerald_stretch'); ?><?php the_title(); ?>"><?php the_title(); ?></a></h1>
        			<?php the_content(__('Read the rest of this post &raquo;','emerald_stretch')); ?>
        			<p id="postmeta">
    					  <img src="<?php bloginfo('template_directory'); ?>/img/calendar.gif" /><a href="<?php bloginfo('url'); ?>/<?php the_time('Y') ?>/<?php the_time('m') ?>/" title="<?php _e('View all posts for the month of','emerald_stretch'); ?> <?php the_time(__('F, Y','emerald_stretch')) ?>"><?php the_time(__('F j, Y','emerald_stretch')) ?></a>
    					  &nbsp;<img src="<?php bloginfo('template_directory'); ?>/img/tag.gif" /><?php the_tags(__('Tags','emerald_stretch') . ':&nbsp;', ', ', '&nbsp;'); ?>
                <?php _e('Posted&nbsp;in', 'emerald_stretch'); ?>:&nbsp;<?php the_category(', ') ?>
    					  &nbsp;<img src="<?php bloginfo('template_directory'); ?>/img/comments.gif" /><?php comments_popup_link(__('COMMENTS','emerald_stretch'), __('ONE COMMENT','emerald_stretch'), __('% COMMENTS','emerald_stretch'), '', __('Comments Closed', 'emerald_stretch')); ?>
    					  <span class="editlink"><?php edit_post_link(__('Edit','emerald_stretch'),'',''); ?></span>
    				  </p>
    				<?php $withcomments = true; comments_template(); ?>
    
        		<?php endwhile; ?>
    			<a href="#top">Top of Page</a>
     		  <br />
    			<ul class="postnav">
     				<li class="left"><?php next_posts_link(__('&laquo; Older Entries','emerald_stretch')) ?></li>
      			<li class="right"><?php previous_posts_link(__('Newer Entries &raquo;','emerald_stretch')) ?></li>
    			</ul>
    
    		<?php else : ?>
    			  <h1><?php _e('Oops! This blog is brand new','emerald_stretch'); ?></h1>
    			  <p><?php _e('No posts were found.','emerald_stretch'); ?></p>
    		<?php endif; ?>
    
        </div>
    
    <!-- /CONTENT -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    
    <a name="bottom"></a>

    ———————
    page.php:

    <?php get_header(); ?>
    
    <!-- CONTENT -->
    
     <div id="content-wrapper">
       <div id="content">
    
    		<h1 class="pagetitle"><?php the_title(); ?></h1>
    		<?php global $dlPageId; $dlPageId = null;	?>
    		<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    		  <?php $dlPageId = $post->ID; ?>
    		  <?php the_content(); ?>
      		<center><div style="clear: both;"><?php edit_post_link(__('Edit this page','emerald_stretch'), '<p>', '</p>'); ?></div></center>
    		<?php endwhile; endif; ?>
      </div>
     </div>
    
    <!-- /CONTENT -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    ——————-
    comments.php:

    <?php
    	if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
    		die (__('Please do not load this page directly.', 'emerald_stretch'));
    
            if (!empty($post->post_password)) {
                if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) {
    				?>
    				<p><?php _e('This post is password protected. Enter the password to read comments.', 'emerald_stretch'); ?></p>
    				<?php
    				return;
                }
            }
    		$oddcomment = 'alt';
    ?>
    
    <div id="respond"></div>
    <div id="comments">
    
    	<?php if ($comments) : ?>
    		<h1><?php comments_number(__('No Responses','emerald_stretch'), __('One Response','emerald_stretch'), __('% Responses','emerald_stretch')); //_e(' to “','emerald_stretch'); the_title(); _e('”', 'emerald_stretch'); ?></h1>
    		<div id="comment-area">
    			<ol>
    			<?php foreach ($comments as $comment) : ?>
    				<li class="<?php echo $oddcomment; ?> <?php if (function_exists('author_highlight')) { ?> <?php author_highlight(); ?><?php } ?>" id="comment-<?php comment_ID() ?>">
    
    					<p class="commenter"><?php echo get_avatar( $comment, 48 ); ?> <?php comment_author_link() ?><span class="comment-info"> - <?php comment_date(__('F j, Y', 'emerald_stretch')) ?></span></p>
    					<?php if ($comment->comment_approved == '0') : ?>
    						<span class="comment-moderation"><?php _e('??? Your comment is awaiting moderation ???', 'emerald_stretch'); ?></span>
    					<?php endif; ?>
    					<?php comment_text() ?>
    				</li>
    
    				<?php
    					if ('alt' == $oddcomment) $oddcomment = '';
    					else $oddcomment = 'alt';
    				?>
    
    			<?php
    			if ( is_home() ) {
    			  static $comment_output_count = 0;
    			  $comment_output_count++;
    			  if ( $comment_output_count == 3 ) {
    				break;
    			  }
    			}
    			?>
    
    			<?php endforeach; ?>
    			<?php unset($comment_output_count); ?>
    			</ol>
    		</div>
    
    	<?php if ('closed' == $post->comment_status) : ?>
    		<!-- <h3><?php _e('Comments are closed for this entry.', 'emerald_stretch'); ?></h3> -->
    		</div>
    	<?php endif; ?>
    
    	<?php else : ?>
    		<?php if ('open' == $post->comment_status) : ?>
    		<?php else : ?>
    			<!-- <h3><?php _e('Comments are closed for this entry.', 'emerald_stretch'); ?></h3> -->
      		</div>
    		<?php endif; ?>
    	<?php endif; ?>
    
    	<?php if ('open' == $post->comment_status) : ?>
    
    			<?php if ( is_home() ) : ?><a href="javascript:void()" onclick="document.getElementById('comment-form-<?php the_ID(); ?>').style.display = 'block'"><?php _e('Post a Comment', 'emerald_stretch'); ?></a><?php endif; ?>
    
    			<?php if ( is_home() ) : ?>
    			<div id="comment-form-<?php the_ID(); ?>" style="display:none">
    			<?php else : ?>
    			<div id="comment-form">
    			<?php endif; ?>
    			<?php if ( !is_home() ) : ?><h1><?php _e('Post a Comment', 'emerald_stretch'); ?></h1><?php endif; ?>
    			<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
          <p><?php _e('You must be', 'emerald_stretch'); ?> <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>"><?php _e('logged in', 'emerald_stretch'); ?></a><?php _e(' to post a comment', 'emerald_stretch'); ?>.</p>
    		</div>
    	<?php else : ?>
    		<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
    			<?php if ( $user_ID ) : ?>
            <p><?php _e('Logged in as', 'emerald_stretch'); ?> <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <?php wp_loginout(); ?>.<!-- <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account', 'emerald_stretch'); ?>"><?php _e('Log out &raquo;', 'emerald_stretch'); ?></a> --></p>
    			<?php else : ?>
            <p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="30" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
            <label for="author"><?php _e('Name', 'emerald_stretch'); ?><?php if ($req) _e(', required', 'emerald_stretch'); ?></label></p>
            <p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="30" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
            <label for="email"><?php _e('Email (will not be published)', 'emerald_stretch'); ?><?php if ($req) _e(', required', 'emerald_stretch'); ?></label></p>
            <p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="30" tabindex="3" />
            <label for="url"><?php _e('Your Website (optional)', 'emerald_stretch'); ?></label></p>
    			<?php endif; ?>
    				<p><textarea name="comment" id="comment" cols="60" rows="10" tabindex="4"></textarea></p>
    				<?php do_action('comment_form', $post->ID); ?>
    				<p>
    					<input name="submit" class="button" type="submit" id="submit" tabindex="5" value="<?php _e('Submit', 'emerald_stretch'); ?>" />
    					<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
    				</p>
    		</form>
    	</div>
    	<?php endif; ?>
    
    </div>
    
    <?php else : ?>
    </div>
    <?php endif; ?>

    Thanks
    Lance

Viewing 15 replies - 1 through 15 (of 17 total)
  • Thread Starter lance007

    (@lance007)

    The Page.php file doesn’t seem to be doing anything. I have tried to completely delete the code in the page.php file and update it without any code in it, and it still does the same thing. It shows the pages, other than the home page, with the sidebars below the text.

    hmmm…I think you need to slow down. That kind of thing is never related to the files from the theme. I recommend putting the original ones back and troubleshoot elsewhere.
    Like for one thing, your page won’t even validate. You should find out why that is.
    Also, I gave some advice in your other thread

    Thread Starter lance007

    (@lance007)

    You’re right – I’m going crazy here trying different things to fix this issue.

    I really do not want to go back to the original – I’m pretty sure it was bad coding.
    What do you mean my page won’t validate – I have no idea what that means.

    I tried your link and my whole site doesn’t seem to validate. No idea what that means.

    Any possibility of checking my code above and seeing what’s wrong?
    Why would the front page work fine and not the other pages? Where would I find the difference? What controls the other pages compared to what controls the home page? maybe if I can compare the two I will find where the difference lies.

    thanks

    Thread Starter lance007

    (@lance007)

    Could it be in my style.php?

    Could it be in my style.php?

    I can almost guarantee it’s not in any theme file – this kind of problem never is. It is almost always errors you introduce somehow, i.e. c & p’ing from the web or rich text editors like office and word, or messing with files :>) or a plugin is not incorporating with the theme, etc.

    What I would do is download another 3 column theme similar to yours and test it on your site – or dlete all of the original theme files – upload a fresh copy and modify slowly using back ups. You can always look at another theme’s files to see how things are done.

    As for validation – that shows what problems if any your site has. It’s important to be valid for all browser compatibility

    Thread Starter lance007

    (@lance007)

    I have no idea how to change themes. Sounds like it would be a nightmare.
    Can you recommend a 3 column theme. How would I remember what changes to make? It seems like I would be starting all over again and just redoing all the mistakes.

    Go to your nearest book store. Purchase WordPress for Dummies. Start at the beginning and work your way through it.

    This does not mean you are a dummy. It just will answer many of your basic questions and more. I keep a copy in my library with all the other “Dummy” books, like HTML for Dummies and Java Scripts for Dummies.

    Thread Starter lance007

    (@lance007)

    THAT’S GREAT FOR THE LONG TERM, BUT I NEED EMERGENCY HELP NOW

    I think the failure is in ‘comments.php’.
    there is one closing </div> too many – I just can’t be bothered to find out which one.
    you need to go through it div by div and find the excessive one.

    Thread Starter lance007

    (@lance007)

    How am I supposed to match them up? What do I look for? Can’t I just delete the last one?
    I actually have 6 <div> and 9 </div>
    How am I supposed to know which ones I need?

    thanks

    First of all, it is not wise to just start adding code here and there, modifying things if you don’t really know what you are doing.. errors will definitely happen or you will have browser compatibility issues (or both)… that said:

    You have a clear:both; in your page.php. With this, no floating elements are allowed on either the left or the right side of the div. Try taking that out and see how that works.

    Again, take this out of your page.php file:

    <center><div style="clear: both;"><?php edit_post_link(__('Edit this page','emerald_stretch'), '<p>', '</p>'); ?></div></center>

    THAT’S GREAT FOR THE LONG TERM, BUT I NEED EMERGENCY HELP NOW

    “EMERGENCY” – sorry this is not an emergency the definition of which is, An emergency is a situation which poses an immediate risk to health, life, property or environment.

    It would be much better and make more sense to backup the db and reistall your theme or WP if it takes that. I am talking about 10 minutes of time to do that rather than send folks here on a wild goose hunt trying to figure out what you did.

    Take a deep breath, your aren’t loosing thousands of readers, start from the beginning. And get that book!

    Thread Starter lance007

    (@lance007)

    I think I figured out what was happening, but I don’t know why exactly.

    I tried starting my whole blog over again – scrapped the last one completely – signed up for a new wordpress account and started with a completely new theme – Atahualpa. And exactly the same thing happened. Everything seemed to be going ok until I started installing text widgets in the sidebar. After I had installed them on the left and right sidebar my pages other than my home page got all screwed up again – the sidebars were sitting below the text and the text was in one of the sidebars. The right sidebar spanned from the center column all the way to the right sidebar.

    I looked at https://www.validator.w3.org to see whether my site: https://www.Lancesview.com would validate. And it did not. There were tons of errors. Most of them were related to a “&” symbol being wrong. I used it in my postings and meta tags and supposedly that was causing some of the issues.
    The validator also said that I had improper code in my text boxes: I had links to amazon for some books I was recommending and apparently whatever I did, it did not like. It worked when I clicked on the links so I don’t understand.
    I had something like this in the text widget:

    <a target="_blank" href="https://www.amazon.ca/Atlas-Shrugged-Leonard-Peikoff/dp/0452011876/ref=sr_1_1?ie=UTF8&qid=1252792056&sr=8-1-spell>Atlas Shrugged</a>

    I also had some links in my postings which the validator did not seem to like. Something like:

    <a href="mailto:[email protected]">[email protected]</a>.

    and:

    <a target="_blank" href="https://support.apple.com/kb/ht3669">Products Compatible with Snow Leopard.</a>

    and:

    `Canon drivers.

    I do not understand how all these things could screw up my blog so badly. What am I doing wrong?
    Please help me. I have spent about 30 hours over the past few days trying to fix my blog and I have no idea what I’m doing. It shouldn’t be this difficult on wordpress!

    Thanks

    Lance

    signed up for a new wordpress account

    Are you hosted at wordpress.com by chance?

    Thread Starter lance007

    (@lance007)

    no – yahoo.
    and p.s. – I thought wordpress was supposed to be for dummies. I must really be extra stupid

    I don’t even know why the backticks I put in for the code in the post above didn’t work – what the hell is going on here.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Sidebars below text’ is closed to new replies.