comment template problem
I have the following problem:
In general I let people react to any post on the site and all works fine. But with some posts I want to disable the comment option. Problem is that whenever I uncheck the comment option and save the post, the sidebar drops below the post.
I’ve counted all the div’s and /div’s and that’s not the problem. Anyone have any idea what could cause this?
Can anyone tell me how to NOT load the comments template in some categories?
Anyone have any idea what could cause this?
A link to a page demonstrating the problem would help. It’s probably a CSS or markup issue.
Ok, the following is a post with comments enabled (and therefor no problems):
The following is a post with comments disabled:
Hope you can help.
You’re missing the closing
#contentleftwhen comments aren’t enabled – which means that your right sidebar is being rendered inside your #contentleft instead of to the right of it.
You need to take a closer look at single.php.
the single.php shows exactly 20 times <div> and 20 times </div>
should I post the code here?
Use the WordPress pastebin and then post the pastebin url here.
Have you looked at comments.php? Do the opening and closing divs match in that file? I think the comments.php is supplying the closing
</div>for #contentleft. So no comments – no closing
Looked at comments, exactlty 18 times <div> and 18 times </div>
Well then leaves the header, footer and sidebar files as possible culprits..
Create an empty php document, paste the code in from the header, followed by the code from the footer, now look at the elements…
Those 2 files together should form a layout of complete elements, what would usually be sat between them makes no difference..
Well, when I do that (take the code of header and footer and copy/paste it in a new file) I come to 13 times <div> and 13 times </div>.
so, what else could be wrong?
Then it’ll be whatever sits between those… (i think)..
page.php if it’s a page
single.php if it’s a single post
we started out with looking at the single.php and with page.php it’s not a problem, cause that file doens’t call the comments template.
Do you have a custom callback for comments in your functions file?
- The topic ‘comment template problem’ is closed to new replies.