😅Disable Comment (ok)
https://developer.wordpress.org/reference/functions/comments_open/
C:\xampp82\htdocs\wp1\wp-content\themes\twentytwentyfour\functions.php
// 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
C:\Users\Administrator\AppData\Local\Temp\scp10514\public_html\wp-content\themes\gutener-child\single.php
// 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
Was this helpful?