Look at your template to see if you’re calling the comments template like so:
<?php comments_template(''); ?>
and change it to:
<?php comments_template(); ?>
(Note the lack of quotes/parameter).
Thread Starter
Glitch
(@glitch)
I can find any instances of a comments_template function in my theme files, is there some sort of compatability issue here, I believe I’m using WordPress 2.0, so is there a different syntax for comments or something?
Also, is the comments_template fucntion supposed to be in my template files or in the comment-functions.php file?
The function comments_template() is what we call an include tag, and belongs in your theme templates (that is, where you want to include/display comments).
You have to be using it (or some reasonable PHP facsimile) to be including the comments template in your posts and Pages. Let’s start with an easy q to help track this down: is your theme using a page.php template?
Thread Starter
Glitch
(@glitch)
No I do not believe so.
Here are the template PHP files:
index.php
header.php
footer.php
comments.php
comments-popup.php
sidebar.php
Does this mean my theme has limited support for custom pages? Does anyone else have the Back-In-Black theme running custom pages successfully?
EDIT
I have dupliacted my theme index.php and comment.php files for you to look at if you need to:
http://max.uttx.net/wp-content/themes/black/index.php.txt
http://max.uttx.net/wp-content/themes/black/comments.php.txt
“Does this mean my theme has limited support for custom pages?“
No, it just means any customization has to be done in the templates as is, or what templates you need added to that theme.
Anyway, this is your problem (in index.php):
<?php comments_template( is_single() ); // Get wp-comments.php template ?>
comments_template() normally accepts only a file (i.e. a template) name as an argument; is_single() is what we call a conditional function or tag, and is used for testing what page (or query) type one is viewing. What it should look like is this:
<?php if(is_single()) { // if single post
comments_template(); // Get comments.php template
} ?>
To also display on Pages, use this:
<?php if(is_single() || is_page()) { // if post/Page
comments_template(); // Get comments.php template
} ?>
You can also try just:
<?php comments_template(); // Get comments.php template ?>
since comments_template() should only be included by WordPress on single posts and Pages anyway.
It seems that theme is using a pre-1.5 code for calling the comments template; themes were introduced since WP 1.5.