custom comment_form fields not displaying
-
My ideal comment form will have 3 fields- Name, Location, Comment.
I’m using the following bits of code-comments.php
<?php comment_form( array( 'fields' => apply_filters( 'comment_form_default_fields', $fields ), 'comment_notes_after' => ' ', 'title_reply' => 'Please feel free to share your home owning hopes, dreams, or concerns?', 'logged_in_as' => '', ) ); ?>
functions.php
<?php function my_fields($fields) { $fields['Name'] = '<p>Name</p>'; $fields['Location'] = '<p>Location</p>'; return $fields; } add_filter('comment_form_default_fields','my_fields'); ?>
As you can see on the live site, that’s not working. Any ideas why/how to remedy?
- The topic ‘custom comment_form fields not displaying’ is closed to new replies.