Front End User(bloger) turn on and off his comments
you should do something like this //For update a page when use costum template $post = get_the_ID(); $my_post = array( ‘ID’ => $post, ‘comment_status’ => ‘open’ // closed ); // Update the post into the database wp_update_post( $my_post );