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?
- Refresh page after form action
- contactform7 remove tags with “wpcf7_autop false” from functions.php
- Shortcode producing headers already sent error
- How to add attributes to a shortcode
- How to display random users with avatars
- Add new user : make the fields First Name and Last name required
- Shortcode to get featured image of specific id post
- Modify shortcode to work with custom post types
- shorthand syntax for custom fields
- Shortcode of a function
- dynamic enquiry form [closed]
- show all the posts thumbnails
- How to add a shortcode to call a function
- How can I call a PHP function inside a hardcoded shortcode?
- Problem with shortcode inside a shortcode
- Need help making a short code work
- This code is supposed to only allow user to be authenticated if accountVerified is equal to 1, but it still allows user to be authenticated otherwise
- 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?
- Display a list of random terms from custom taxonomy with shortcode
- Load templates, pass arguments, and render output from functions.php
- How to add if statement on WordPress shortcode output
- Passing function arguments via a shortcode
- Pagination not working – FrontPage
- Customizing the wp_video_shortcode output with add_filter
- page shows short code not output
- Probleme shortcode with list author
- 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
- Problems adding a new field to product in cart
- Shortcode to output category description by passing ID
- Help using ShortCodes to style whole chunks of the post
- Shortcode to insert default text and change one word throughout it?
- Postback redirect through add_action is not triggered
- use add_action in a shortcode (gravity form – WordPress)
- Button click counter for login user
- Override plugin function to show invoices even if not logged in
- How to change form action of wp-login page with a function
- Shortcode displaying outside the div [duplicate]
- Shortcode Initialization in a Custom Theme
- WordPress Ajaxifying not working properly
- 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?
- Shortcode Function – Can’t get anything else to return after running shortcode within shortcode
- Custom shortcode with do_shortcode and substr
- Sending Messages Back to the Template After Processing?
- Shortcode to eliminate and replace with
- us states dropdown function and echo in theme template files
- Can I use a function to return HTML and the result of another function?
- Adding custom field in menu options [duplicate]
- Problem in outputting shortcode
- Problem in shortcode outputting content
- Expanding a function to call a plugin or show a link
- Trying to the deduce shortcode from a function
- Gravity Forms After Submission – GFFormsModel::update_lead_field_value?
- How to display data from custom fields in my custom shortcode?
- Modify function Shortcode_atts
- Pull random comment from specific post, display on homepage with shortcode
- Set thumbnail from URL, by grabbing image in functions.php
- 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
- Run function from parent on child site
- Gallery Shortcode Function Help
- Add title & subtitle to shortcodes
- Echo custom field value in shortcode function
- Shortcode Variations?
- Shortcodes not outputting in correct divs
- shortcode inside post called by ID does not render as expected
- Custom shortcode not being included in content paragraph [duplicate]
- 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
- Creating mixture of shortcodes to use in the visual/text editor
- PHP error in shortcode [closed]
- WordPress Custom wp mail template return full template
- multible shortcodes (for differnt values) with one function
- Get all users from role and add to dropdown (select) – wordpress, javascript
- Can’t find function which is called in a wordpress theme
- CF7 Remove Comma from ‘select’ ‘radio’ and ‘checkbox’ outouts
- post_content return zero!
- How to make my logged-in user-role shortcode displaying name instead of slug?
- How to redirect using a custom wordpress api endpoint after form submission?