Here is the Form and I would like to add a WordPress nonce to it:

          <form action="" method="post">
            <label>Enter your email address:</label> <input id="email" type="email" name="yourmail" value="<?php echo $current_user->user_email; ?>" disabled="disabled">
            <input type="submit" name="submit" value="Test">

1 Answer 1


Here is a Reference to a form field WP Nonce

<form method="post">
   <!-- some inputs here ... -->
   <?php wp_nonce_field( 'name_of_my_action', 'name_of_nonce_field' ); ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.