😅Disable Comment (ok)
https://developer.wordpress.org/reference/functions/comments_open/
// Start Disable Comment
add_filter('comments_open', 'func_comments_open');
function func_comments_open($comments_open)
{
return false;
}
add_filter('get_comments_number', 'func_get_comments_number');
function func_get_comments_number($comments_number)
{
return 0;
}
// End Disable Comment// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;Last updated