V
V
VIRGOS7772021-11-15 21:24:18
PHP
VIRGOS777, 2021-11-15 21:24:18

How do I make it say "Comments on this article are closed" when closing comments on a Wordpress article?

Site on the Wordpress engine

In the posts there is such a function as to close the article from comments. So when you close the comments on this post, it's just empty. The visitor does not see anything. And I would like to have an inscription at the bottom with the text "Commenting on this article is closed" maybe someone knows how to implement it ?!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Artem Zolin, 2021-11-15
@artzolin

if ( comments_open() ) {
  comment_form();
} else {
  echo '<p class="no-comments">' . __( 'Comments are closed', 'skill' ) . '</p>';
}

A
Artem Gvozdev, 2021-11-15
@arty23_03

don't know how to google?
wordpressinside.ru/functions/zakryvaem-commentarii

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question