• Hi!

    I need to enable comments only for a time period that will be entered in 2 custom fields. Any hint for achieving that?

Viewing 2 replies - 1 through 2 (of 2 total)
  • You can update your comments template with a conditional that compares those two dates (start and finish) with today’s date.

    $today >= $start && $today <=$finish

    You are gonna want to work your new conditional into the if(comments_open())conditional that’s likely already there.

    Thread Starter katutxakur

    (@katutxakur)

    thanks for your reply markparolisi. That can be enough for what I need!

    But doing that way, comments won’t be closed at all. Could that become a problem (for example bots still capable of writing spam)?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Comments open for a time period’ is closed to new replies.