• I recently upgraded wordpress to 2.0.1, and I want to add comments again. I used to have it enabled, but I was getting so much comment spam, I disabled it. With WordPress 2.0’s new spam protection, I would like to re-eneable it. I just tried to upgrade my loop to the 1.5 loop, but it didn’t work.

    Here is the start code I’m using now.

    <?php /* Don’t remove this line. */ require(‘./news/wp-blog-header.php’); ?>

    I tried using the folling code, and it gave me a php error.

    <?php define(‘WP_USE_THEMES’, false); get_header(); ?>

    So what do I have to do to make it work, and how do I get comments to work. This is what I’m using now.

    “><?php comments_number(‘0 comments’,’1 comment’,’% comments’); ?>.

    The comment number shows up, but when you click the link, it takes you back to the post, with no comment form at the bottom. I used to have this working, but I took it out when I installed 1.5.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Maybe you haven’t included the comments template?

    Not sure what exactly you’re looking for but its probably one of these. To display how many comments exist for a post (for instance on your index page) use this:

    <?php comments_popup_link('No Comments ', '1 Comment ', '% Comments '); ?>

    To display comments and the comment form on an individual posts page you need to add this:

    <?php comments_template(); ?>

    If that’s not enough help look through index.php and single.php in the default theme to see how it’s done there.

    Thread Starter joshuaclinard

    (@joshuaclinard)

    I was able to get the comments template embedded in the index file correctly, but the link will not take the user directly to the comment form. It takes them to the top of the post, so they have to scroll all the way down. I tried putting the following directly above the comment form, but it didn’t work. What do I do?

    <a href="index.php#comments"></a>

    Oh, and how can I turn on comments for all posts?

    Thread Starter joshuaclinard

    (@joshuaclinard)

    Can anyone help with this?

    If the link to your comments ends in #comments then a small tweak to the above will work. At the top of your comment form put comments as the ID on an element. For instance, <div id="comments">

    Wow, I used the word ‘comments’ five times in 3 sentences. Writing teachers everywhere are spinning in rage. Let me know if it needs to be clearer. ??

    Thread Starter joshuaclinard

    (@joshuaclinard)

    Thanks. That worked perfectly. Now I need to know how to turn all comments back on.

    admin > Options > Discussion ?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How do I make comments work with my own design?’ is closed to new replies.