• Resolved juneatnoon

    (@juneatnoon)


    On my index page, there’s a link to the comments popup page. If you are viewing a single page, however, the comments template is right on the page. I have chosen to automatically disable comments after x number of days, and when that happens,

    a) the single page no longer shows the comment form, but it also does not say anything about comments being closed. How do I make it say that?

    b) the index page still has a link to the comments popup, which still has a form available for comments. How do I change that?

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • a) Try adding <?php if('open' == $post->comment_status) : ?> before the comment form markup and <?php endif;?> after the form markup in comments.php.

    b) Change <?php comments_popup_link( [...] ); ?></p><?php endif;?> to
    <?php if('open' == $post->comment_status) : ?><p class="comment_link"><?php comments_popup_link( [...] ); ?></p><?php endif;?> in index.php

    Thread Starter juneatnoon

    (@juneatnoon)

    Thank you. It looks to me like that text IS written in my comments coding, though…. And I think that just results in having no comment form AND being unable to read any of the previous comments. There’s only a note saying they’re closed. What I want it to look like is this: When comments are automatically closed, you can still read any previous comments left, but there is now a notice indicating that no further comments can be made. Instead, all the previous posts are listed (as I want), but there is no indication that comments are now closed. Does that make sense?

    Also, out of curiosity, do you know why the automatic closing just results in the lack of a comment form with previous comments displayed, yet if I manually disable comments it will say “comments closed” and not display previous comments? Is there a difference between the automatic closing and the manual disabling?

    (BTW, I’ve decided not to use a popup window, so now I’m just dealing with the comments.php file.)

    Thread Starter juneatnoon

    (@juneatnoon)

    Ok, after puzzling for hours I’ve figured it out. I had to add a <?php else … to my comment form and fiddle around with the placement of the <? php if … related to no comments, but now it’s working just like I want it. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Closed Comments, Differnet Templates’ is closed to new replies.