Is it possible to change the fields that are available in the comments form? By default my comments form is asking for Name, Email, Website, and then the actual message. I’d like to remove website and replace it with a new field of my choosing.
What’s the best way to accomplish this?
This answer can change depending on the theme or plugins you have installed, but the code can usually be found in similar places of the theme editor.
For example, if you are using the default Twenty Eleven theme in WordPress 3.2.1, you can verify the location of the comments call by checking here:
This will bring up the page that WordPress uses to generate the comments display.
Some themes may have entered code that you can edit directly to change the display. Twenty Eleven uses the default WordPress function ‘comment_form()’ to display the form used for new comments.
A lot can be done to change the values at this point, and you should take a look at the full documentation of comment_form() for all of the details. To get you started though, click on Theme Funcitons on the right side to open the functions.php file and add the following at the bottom:
It can definitely get more complex than that if you need it to, but this will get you started.
Way to add a new field…
Apologies, but I don’t have an idea how to save the new field.