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

How to add a placeholder to the protected post password input

This can be achieved via a hook, called the_password_form: function my_theme_password_placeholder($output) { $placeholder=”Hello!”; $search=”type=”password””; return str_replace($search, $search . ” placeholder=\”$placeholder\””, $output); } add_filter(‘the_password_form’, ‘my_theme_password_placeholder’); A str_replace searches for the string type=”password” inside the output. This gives an attribute to the <input> indicating it’s of type password. The replacement string contains the searched one plus the … Read more

How to move HTML form to WP Theme

use wp_enqueue_script() function to load your required javascript and css files for the form. Then follow this tutorial to have knowledge about creating a form plugin and how to use that. You have another option left. If you are familiar with WordPress page template then you can create a page template for the page that … Read more

WordPress Emails & Contact Forms [closed]

Your could debug php mailer in WP using franz’s wpmail_exceptions plugin https://gist.github.com/franz-josef-kaiser/5840282 Place the first file in /wp-content/mu-plugins/ and make sure you’ve set WP_DEBUG to true. You should test while logged in as administrator. Errors will be printed in main buffer so make sure to inspect any xhr requests if your form works asynchronously (Ajax). … Read more

Custom tables and using wpdb to insert into DB from a html form

You’re using a placeholder (“%s”) in your SQL for prepare, but you don’t pass it a value to put in place of that placeholder, hence the complaint. use $wpdb->prepare(“SELECT … %s”, $myvalue) And I’m pretty sure your other error stems from you passing in a DateTime object. $wpdb will not convert that automatically, it expects … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)