WordPress Security: Can’t get wp_nonce to work

after hours of trying and reading almost every blogpost about it I give up. Can somebody help me out?

My page would’t validate a nonce correctly.

Here are the excerpts:

file 1: user_frontend_form.php

$wp_nonce = wp_nonce_field('action_configurator','field_configurator');  

// Quiz Form
$page_content .= '<form action="'. $site_url .'" method="post" id="quiz" name="quiz">


$page_content .= '</form>';

And the file receiving the form: summary.php

if ( check_admin_referer( 'action_configurator', 'field_configurator' ) ) {
    $page_content .= '<h1>some stuff</h1>';

This is just an example of some things I tried. Please note that I am writing a plugin, so I am using the

$page_content .=

to setup the page for the user to view.

Thanks in advance,

Read more here: WordPress Security: Can’t get wp_nonce to work

Leave a Reply

Your email address will not be published. Required fields are marked *