Support » Fixing WordPress » Comments

  • On my website, I did my own theme, but I did´nt have code for the comments. What is the most simple way to fix that I can use comments on the website?

    Thanks in advance, Axel.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Michael


    Forum Moderator

    add <?php comments_template(); ?> into page.php and single.php (or into index.php if those other templates do not exist);

    also, add a comments.php into your theme;

    (at the moment, WordPress still uses the /wp-includes/theme-compat/comments.php if your theme does not have its own)

    you can use that /wp-includes/theme-compat/comments.php as an example code for your own comments.php;
    also look into comments.php of the default themes Twenty Twelve for example code – just do not copy/paste the files.

    also, check the dashboard settings under ‘discussion’ and for the individual posts or pages.

    Thanks, but it does not work. What am I doing wrong???



    Forum Moderator

    what have you done at all?

    can you post some code?

    comments will not work on index pages or archive pages – only works on single posts or static pages.

    I am only using WordPress for my blog page, the homepage is not made in WordPress. In wordpress, I only got a index.php (and some css files). All the code for the blog are in that file.

    Here is the loop:

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <font face="arial"> <h1><?php the_title(); ?></h1></font> <font size="1" face="times"><hr noshade color="#EEEEEE"><?php the_date(); ?> <?php the_time(); ?><hr noshade color="#EEEEEE"></font>
    <center><font face="arial"> <?php the_content(); ?>
    <hr noshade color="#EEEEEE">
    <?php comments_template(); ?>
    </center><hr noshade color="#000000"> <?php endwhile; endif; ?><p>&nbsp;</p>


    Forum Moderator

    can you post a link to as single post (or a static page) with definively comments enabled –

    for instance:
    dashboard – posts – all posts – click ‘quickedit’ below the post title – tick ‘allow comments’

    (same for pages)

    do you see the comments form in single posts or static pages, when you temporarily switch to the default theme Twenty Twelve?

    Now it works fine! But can I change the design of the form? It looks not so nice…

    Sorry, bad english…

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Comments’ is closed to new replies.