Im having a problem that I know is right under my nose but I just cannot figure it out. Im not sure if anyone can help me or not. It is once again on the site I have been building www.linkcreativedesign.com On my blog posts that DO NOT have comments.. there are div items that are not inside the wrapper and they are suppost to be in. It is ok on all other. I think I have figured out that is is something in the comment.php file where I need to ad or move a </div> end tag.. but I just cannot figure it out. Ive tried moving it all around, taking one out, adding more and it either messes other things up OR makes it so blog WITH comments have the same issue.
basically my side bars, and footer get all messed up on these blog post single pages without comments.
here is some additional information that is obviously a part of the problem. I have No idea how this is happening.
when I view the page source for the single blog post page on the site that is messed up there is this.. (this is just a snippet towards the end where I see the issue.
\"<div id=\"footer\"> <div id=\"fleftcol\"> <p>Copyright (c) 2003-2009 Link Creative. All rights reserved.<br> Link Creative is powered by <a href=\"http://wordpress.org/\">WordPress 2.7</a></p>
There are 2 end divs outside of the </body> and </html> that obviously shouldnt be there... I dont know how they go tthere.. when I go to my footer.php there is no such /divs outside of the </body></html> tags
Ok. When I view the page source of my blog post with comments that has no isses, it also has those 2 </div> tags outside of </body></html> so maybe it is not directly related to the problem.
when I view the page source of my home page or anything that isnt a single blog post page it does NOT have those 2 </div> tags.
Also this is what happens. if I remove one of the </div> tags at the bottom of the code in the comments,php file the problem switches to blog posts WITH comments have the issue instead of Blog posts without comments. It alternates.
it def seems to be comment related.
Another thing I did last night and Im not sure if this problem is related or not because I dont know if I caught it. Last night I important blog posts from blogger... I wonder if it is related to that.
thats my problem I dunno where the actual problem is. I know when I mess around with the divs in the comments.php it changes the way things are messed up as I said but.. Ill look at the pages.php
here is the code for my comments.php to look at.
<?php // Do not delete these lines if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) die ('Please do not load this page directly. Thanks!');
if (!empty($post->post_password)) { // if there's a password if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie ?>
<p>This post is password protected. Enter the password to view comments.</p>
<?php return; } }
/* This variable is for alternating comment background */ $oddcomment = 'class=\"alt\" '; ?>
<!-- You can start editing here. -->
<?php if ($comments) : ?> <div id=\"comments\"><h3><?php comments_number('No Responses', 'One Response', '% Responses' );?> to “<?php the_title(); ?>”</h3>
<?php if ( get_option('comment_registration') && !$user_ID ) : ?> <p>You must be <a href=\"<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>\">logged in</a> to post a comment.</p> <?php else : ?>
<p>Logged in as <a href=\"<?php echo get_option('siteurl'); ?>/wp-admin/profile.php\"><?php echo $user_identity; ?></a>. <a href=\"<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout\" title=\"Log out of this account\">Log out »</a></p>
I fixed it.. simple cut and paste new code from an untouched comments.php file.. added 3 </div> s toward the bottom and it did the trick. ?? dunno what I did before but I obviously messed something up bad.
I fixed it.. simple cut and paste new code from an untouched comments.php file.. added 3 </div> s toward the bottom and it did the trick. ?? dunno what I did before but I obviously messed something up bad.
On my blog posts that DO NOT have comments.. there are div items that are not inside the wrapper and they are suppost to be in. It is ok on all other. I think I have figured out that is is something in the comment.php file where I need to ad or move a </div> end tag.. but I just cannot figure it out. Ive tried moving it all around, taking one out, adding more and it either messes other things up OR makes it so blog WITH comments have the same issue.
basically my side bars, and footer get all messed up on these blog post single pages without comments.
when I view the page source for the single blog post page on the site that is messed up there is this.. (this is just a snippet towards the end where I see the issue.
There are 2 end divs outside of the </body> and </html> that obviously shouldnt be there... I dont know how they go tthere.. when I go to my footer.php there is no such /divs outside of the </body></html> tags
Ok. When I view the page source of my blog post with comments that has no isses, it also has those 2 </div> tags outside of </body></html> so maybe it is not directly related to the problem.
when I view the page source of my home page or anything that isnt a single blog post page it does NOT have those 2 </div> tags.
Also this is what happens. if I remove one of the </div> tags at the bottom of the code in the comments,php file the problem switches to blog posts WITH comments have the issue instead of Blog posts without comments. It alternates.
it def seems to be comment related.
Another thing I did last night and Im not sure if this problem is related or not because I dont know if I caught it. Last night I important blog posts from blogger... I wonder if it is related to that.
the source code only shows the html, we need to know where that html is being created.
for example, you know your search bar, the main html is made in the searchform.php file, but it is called within say the index.php file
but check your commentspopup.php does not have your footer & sidebar included
here is the code for my comments.php to look at.
these should be left in the footer.php
so the code should look like (for say index.php) at the end:
[cdoe]
<?php get_sidebar(); ?>
<?php get_footer(); ?>
[/code]
those 2 divs are inside your footer, by the looks of it
or you have put your sidebar/footer.php inside divs
EDIT: it seems fine now, did you do anaything?
well done