Comments are open but comments_open() returns false?
-
Recently, we have noticed that the comment_form on one of our blogs have stopped appearing. After investigation, comments_open() returns false while every data (global or post) in the database says otherwise (they are at true).
While I have searched for a reason for this, I haven’t been able to find a cause for it. The problem strangely only happens on our production server and seems to have appeared around the day 4.3 came out.
I tried to enforce comments to be open with the bare minimum, but it still returns false.
function my_comments_open( $open, $post_id ) { //$post = get_post( $post_id ); $open = true; return $open; } add_filter( 'comments_open', 'my_comments_open', 10, 2 );
The following code above still makes the value return as false.
I am really at a loss and this is the first time something like this happen.
Anyone got this problem or maybe knows what can be conflicting? I tried deactivating plugins, without success. Switching to a default Twenty theme works (the comment form shows), so it’s not an issue in the database or with plugins.
Seems like something replaces or changes the returned value. I tried commenting most of my functions.php, but without success… Someone has an idea at to what could cause this? Thanks!
- The topic ‘Comments are open but comments_open() returns false?’ is closed to new replies.