How Do I Add a WordPress Form to WordPress?

Adding a WordPress form to your site is easy. To start, create a new file in your theme or plugin directory and name it form.

php. Inside of form.php, add the following code:.

add(‘name’, ‘Name’);

$form->add(’email’, ‘Email Address’);

$form->add(‘message’, ‘Message’);



To display the form, add the following line to your theme or plugin header: