Support » Fixing WordPress » Comments problem – not working – can you look?

  • Resolved kingofmycastle


    Hi! I have been creating a WP blog which can be seen at – The whole site existed before apart from the blog page. I used my original html/css and just added in the PHP to create the WordPress loop, and categories etc. This all seems to work fine.

    Unfortunatly I can’t seem to get the comments to work. Clicking on the ‘comments ?’ link just brings the post back up. I have this in my index.php: <?php comments_popup_link(‘No Comments »’, ‘1 Comment »’, ‘% Comments »’); ?>
    and I have the files comments.php and comments-popup.php in my root directory (which have not been altered).

    All I want is the ability for people to leave some comments on my site. Can anyone tell me where I’m going wrong? I’m using WordPress Thanks in advance!

    John King

Viewing 12 replies - 1 through 12 (of 12 total)
  • You don’t have the comment form in your code for the single post. When you click on the comments link it takes you to the #comments anchor on the page, but you don’t have the code there to display the form. You need to edit your template.

    Thanks for your reply. I’m a bit new to all of this so could you explain this to me a bit more?

    Are you suggesting I add something to my index.php file? Or do you mean I need to mess around with another file?

    If I add some kind of comments anchor on my index.php page will it not appear everytime I go directly to the home page?

    Thank you.

    John King.


    Hi! I saw some help at the wiki here:

    I added this to my index.php:
    <?php comments_popup_script(400,500,’file’); ?>

    Now when you click on comments a box comes up (which is something) but alas the box is empty (404). Can you tell me what file I am missing?

    Thank you.

    John King

    I’ve taken that line out now as it totally messed up my style-sheet in my Firefox broswer. 🙁

    I’ve been looking at that codex page for a week now but unfortunatly it describes everything in what I call a ‘meta language’. Do you know of a more plain english description of how to include comments on my site.

    Thanks again!

    John King..

    Here is a “plain” visual aid about how templates and themes work…

    Thanks, that does help a bit.

    Is part of my problem that I have created my own index.php which I have put in the root directory? (I just added the php stuff such as the wordpress loop into my html and added a php statement at the first line). I’m not actually using a theme from the wp-content/theme directory.

    When I click on the comments link it just takes me to:
    is this correct? It just seems to call the index.php with that post, and does nothing to call up a comments page.


    John King..

    If you are using WP.1.5 or later don’t mess around with other solutions because WP is looking for everything in the /themes/yourtheme/ directory.
    Just place your index.php and your stylesheet (named style.css) in a directory under themes and your life will become easier 🙂
    Explanation: if you don’t have all the template files in your own mytheme folder, WP will looking for the mising ones (like comments etc.) in the Default theme and will “borrow” them from there.

    Thanks Moshu, that makes total sense. Obviously WP uses a database and I’d better keep to the format of putting my files into the correct folder if I expect it work. I’ll post what happens here.


    John King..

    If you move your theme into its own folder, don’t forget to edit the top section of your style.css file:

    Thanks Moshu, I’ve moved the files into a new themes directory and got it looking just as before. I had to add some stuff to link to the stylesheet but it all made sense.

    I now see exactly what I have to do. By looking at the existing themes I can see how I can crib all the code from them and add them to my index.php (or other php) files. I’m sure I’ll be able to get the comments working in no time.

    But not on a Saturday night 😉

    You’ve been really helpful and I appreciate it. Cheers!!!

    John King..

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Comments problem – not working – can you look?’ is closed to new replies.