custom comment fields on CPT
Non-CPT Comments Regarding the first issue: you’re not returning anything if your conditional is false. To simplify your code: function debate_comment_fields( $fields ) { // If conditional is true if( is_singular( ‘debate’ ) ) { // Do some stuff to $fields // Return $fields return $fields; } // If conditional is not true? } add_filter(‘comment_form_default_fields’,’debate_comment_fields’); … Read more