is there anything i need to be aware of since I am calling my posts and comments from the database with sql queries and don’t have a typical loop?
Don’t know if it is always true, but my theme’s comments.php has a test ‘if (have_comments())’. ‘have_comments’ is set in query.php, so I’m guessing that if you don’t use WP_Query, it won’t get set, and no comments will be found.
the thing is that my comments are outputting ok for each post, but just not the field to type in new comments (they were added before I changed my whole theme code around).
I couldn’t find “have_comments” in my comments.php so I don’t think that’s it. I know it’s going through my comments.php file because I tweaked it and I got an error. It’s just, I don’t think I’m going about doing my page in the way that wordpress likes, and not the way anyone else has done so I’m having a real hard time finding help in past posts. Because I am customizing the order and arrangement of the posts, I have to output them in a similar way and I’ve gotten everything to output eventually except the field to type in your comment and register. It’s very elusive for me!
(@shatterjack)
16 years, 4 months ago
hippievstony.com
So when I add the two lines:
$withcomments = ‘1’;
comments_template();
inside my php code in index.php, it outputs “comments are closed” for every post instead of displaying the comment fields where you type in your comments. Comments are enabled in my settings page. Here is my index.php:
I’ve been trying to get the fields so people can comment for a long time, thanks for any ideas
tony