WordPress.org

Ready to get started?Download WordPress

Forums

Removing link for disabled comments? (2 posts)

  1. enmemoire
    Member
    Posted 6 years ago #

    Okay. Lowdown here, is that I have comments disabled on my most recent entry - http://xuan.greyclouds.net/

    Thing is, on the front page, the link still shows up with "No comments" (to the right of the categories meta), instead of just plain grey text that says "Comments off". Here's the bit of configuration code in index.php ...

    <?php comments_popup_link('No Comments', '1 Comment', '% Comments','comments-link ','Comments off'); ?>

    Any ideas how I could remedy this? Thanks in advance! =]

  2. Jeremy Clark
    Moderator
    Posted 6 years ago #

    Try this instead.

    <?php if ('open' == $post->comment_status) : ?>
    <?php comments_popup_link('No Comments', '1 Comment', '% Comments','comments-link ','Comments off'); ?>
    <?php else : ?>
    Comments Off
    <?php endif; ?>

Topic Closed

This topic has been closed to new replies.

About this Topic