wp_nonce_field()
will echo its output by default, so set the $echo
parameter to false
:
add_shortcode('signup_form', 'get_signup_form');
function get_signup_form() {
$wp_nonce_code = wp_nonce_field( -1, '_wpnonce', true, false );
$signup_form_code = <<<EOT
<form method="post" class="popup-register" action="/my-account/">
<p style="text-align:center;">
<input type="email" class="popup-input" style="width: 65%;" name="email" id="reg_email" placeholder="Enter your email address">
<input type="submit" class="popup-input-submit button" style="margin: 0; border: 1px solid #999999;line-height: 19px;" name="register" value="Register">
</p>
{$wp_nonce_code}
</form>
EOT;
return $signup_form_code;
}
Related Posts:
- Solution to render Shortcodes in Admin Editor
- Use AJAX in shortcode
- Include PHP file in Content using [shortcode]
- How can I get $id variable in widget’s form function?
- Shortcode producing headers already sent error
- How to add attributes to a shortcode
- Enabling shortcodes for custom fields
- How to call WordPress functions from a form processing script
- what is the meaning of settings_fields()
- How to use get_media_embedded_in_content function
- Can shortcodes contain conditional statements? Even without them my shortcode renders blank page
- Shortcode with parameters inside parameters
- What is wrong with this Shortcode? I get it in a wrong place inside the content
- Display random text from a file with the WP built-in AJAX API
- Set first oembed in post to a global variable or function
- Remove images from get_the_excerpt
- update_post_meta for custom field not working upon form submission
- Adding body class when post contains a specific shortcode
- Display a text message if the shortcode is found?
- WordPress registration and contact form 7 [closed]
- Detect Safari desktop browser and include the detection in a shortcode
- My simple custom shortcode is not longer working (possibly due to upgrade to WordPress 4.4 ?)
- Ninja form Redirect depending on text field content [closed]
- Display first name of logged in user?
- WordPress upload_mimes not working for front-end uploads of 3D files
- WordPress shortcode attributes for database SELECT?
- Shortcode pagination not advancing
- Having issues with a foreach inside of a shortcode with ACF gallery
- Shortcode inserts paragraphs before and after executing shortcode
- How can I make a widget shortcode to control all the widgets?
- Create a custom taxonomy that will be used to create and filter markers in a Google Map
- Passing variable as add_shortcode argument
- Add button to kitchen sink toggle
- Help With Creating Shortcode
- Shotcode argument issues
- Shortcode parse error – wrong syntax
- Exclude category from shortcode
- get_pages() Returns Only One Item
- Adding an option to a shortcode
- How to use author meta in shortcode?
- Testing for a shortcode using a function. 404 page throwing PHP Notice
- Use a shortcode to display custom meta box contents
- Shortcode to embed Edit Account form not working
- Woocommerce checkout field
- How to properly refresh page after form action?
- How can I pass a shortcode value to the head in wordpress functions.php
- Native gallery custom html output
- dynamic site link for future migration in echo do_shortcode()
- Tracking the number of shortcodes for a list?
- Need a method to prevent WP from adding in between my shortcodes
- Load scripts for do_shortcode( ‘ [ my_shortcode ] ‘ )
- Can I include a custom PHP function in a WordPress function?
- How to create a shortcode out of a php function
- Shortcode of a function
- How to add a shortcode to call a function
- How can I call a PHP function inside a hardcoded shortcode?
- Using One Function To Create Two Different Shortcodes
- Is it possible to create a shortcode to link to a specific post/page where the tag is just an attribute?
- How to add if statement on WordPress shortcode output
- Pagination not working – FrontPage
- page shows short code not output
- PHP multiple forms, same page, isset($_POST[]) not working?
- Function to function shortcode help [closed]
- Last updated posts shortcode in functions.php
- I want to display the sku in the product pages of my EDD website
- Shortcode to insert default text and change one word throughout it?
- use add_action in a shortcode (gravity form – WordPress)
- Shortcode displaying outside the div [duplicate]
- Shortcode Initialization in a Custom Theme
- Shortcode with pagination advancing multiple queries
- Show users last read posts for each user?
- Get shortcode attribute value to another function
- How to retrieve image IDs from shortcode content?
- Display list of pages that contain a certain string within the slug
- Hide disclaimer from summary excerpts
- HowTo: Add wrapper to columns shortcode?
- Function not receiving string from shortcode
- How To Show Shortcodes In WordPress Custom Fields?
- Sending Messages Back to the Template After Processing?
- Shortcode to eliminate and replace with
- Problem in outputting shortcode
- Gravity Forms After Submission – GFFormsModel::update_lead_field_value?
- How to display data from custom fields in my custom shortcode?
- Modify function Shortcode_atts
- Shortcode to output get_header not working
- restrict access to specific urls on a specific period of time
- using enqueue_script in a shortcode isn’t working
- Add title & subtitle to shortcodes
- Shortcodes not outputting in correct divs
- shortcode inside post called by ID does not render as expected
- trouble with passing class method data to outside function
- Will my WordPress site become vulnerable after adding this functions which allows more HTML tags for subscribers?
- Get term count on a category page
- How do grab the main loop, with conditions, and output via shortcodes
- Help finishing script to export WP user data when form submitted
- Display function from functions.php in tag.php
- Directing to functions.php the correct way
- WordPress Custom wp mail template return full template
- multible shortcodes (for differnt values) with one function
- CF7 Remove Comma from ‘select’ ‘radio’ and ‘checkbox’ outouts