comments_open


comments_open ( $post_id = null )

Parameters:
  • (int|WP_Post) $post_id Post ID or WP_Post object. Default current post.
Returns:
  • (bool) True if the comments are open.
Defined at:

Description

Determines whether the current post is open for comments.

For more information on this and similar theme functions, check out the {@link https://developer.wordpress.org/themes/basics/conditional-tags/ Conditional Tags} article in the Theme Developer Handbook.

Related Functions

comment_type, comments_link, comments_popup_link, add_comments_page, is_comments_popup

Top Google Results

User discussions

wpseek mobile