get Discussion setting in wordpress

this code may help you $status = get_option(‘comment_registration’); // 1 : Yes , user must be registered and logged in for commenting // 0 : No (default) You can use the following code for the comment section if (comments_open($postId)) { if (get_option(‘comment_registration’) == 0 || is_user_logged_in() ){ //render comments section }else{ echo “You must login … Read more

comment_approved custom value

I’d hazard a guess that it isn’t possible — at least not in this exact way — because of that default: return false; part of the code you reference: a custom value of the comment status will hit that and the function will stop immediately. However, have you thought about using a comment metavalue to store … Read more