Custom form handling in WP.. the correct way?

“create a plugin” isn’t really a separate option, you’d still need to intercept requests somehow. I’ve used the init method, and it’s a viable option. Checking isset on a POST var before kicking off your processing logic is extremely fast, I doubt you could even reliably measure the impact in the sea of other things … Read more

Contact form submit, having to click twice

It sounds like a ‘classic rollover effect bug’ to me: if you trigger a visual effect on any link (or ‘button’) either with jQuery or JavaScript, users on touch devices may be forced to click twice: “iPad/iPhone hover problem causes the user to double click a link“ I suggest you either try to replace the … Read more

How can I modify labels in default wordpress registration form? [duplicate]

If you are using default WordPress registration form. But there are no “Email” field. OK but you can try below code. if ($pagenow==’wp-login.php’) { add_filter( ‘gettext’, ‘user_email_login_text’, 20, 3 ); function user_email_login_text( $translated_text, $text, $domain ){ if ($translated_text == ‘Email’) { $translated_text=”Email required field”; } return $translated_text; } }

Fatal error: Call to undefined function wp_insert_post()

If you’d like to use WordPress functions inside your naked PHP file, you’ll have to load the WordPress environment: require_once ‘/path/to/wp-load.php’; That said it’s best practice to NOT handle things via separate PHP files like that outside of WordPress, but use a plugin instead and fire your code on an appropriate action. You can use … Read more

Saved emails at dashboard

Yes. You can use Contact Form 7 plugin to create a form that will send messages to your email (like gmail, etc) and use another plugin from the same author, Flamingo, to have those messages saved in WordPress database and available in the dashboard. If you prefer to avoid plugins, here’s what you need: Register … Read more

Is there a reset_button()?

You can reuse the submit button code: print str_replace( ‘”submit”‘, ‘”reset”‘, get_submit_button( ‘Reset’ ) ); This should create a button with the regular style for submit buttons. The attributes name, type and id will be set to reset. Not tested. 🙂

How to change a form end email?

In admin, check the page template used by the contact page, and look for it in your theme folder. Page templates are applied as described here: https://developer.wordpress.org/themes/basics/template-hierarchy/#single-page