Custom Registration with Select and Upload function
You must use enctype=”multipart/form-data” in the <form> tag for the file upload to work.
You must use enctype=”multipart/form-data” in the <form> tag for the file upload to work.
I found that I was setting the default mime type for wp_mail_content_type to be text/html which according to the notes on the codex can cause this particular issue. I’ve removed the code from my functions file, and the registration email looks better, but (and I haven’t seen WordPress’s emails in a long time) still doesn’t … Read more
You can use wp_dropdown_roles()
First, make sure you have a Page set up with the slug “join”. This page must exist if you expect to point visitors there. Second, using this filter will NOT redirect you to the /join/ page when you directly visit wp-login.php. It only replaces the URL WordPress uses when generating links/URLs to the default signup … Read more
There’s a lot of reasons this isn’t working. The best place to to start is the Widgets API page in the Codex. It outlines a basic class for creating a widget. At a minimum, you need a class with a __construct(), widget(), form(), and update() function. You also need to register your widget correctly. The … Read more
Solved: There was different capitalization on the variable $key ($Key vs $key) Always the simple things you miss eh? 🙂
Ues this function to redirect admin to dashboard function admin_login_redirect( $redirect_to, $request, $user ) { global $user; if( isset( $user->roles ) && is_array( $user->roles ) ) { if( in_array( “administrator”, $user->roles ) ) { return $redirect_to; } } } add_filter(“login_redirect”, “admin_login_redirect”, 10, 3); For more/brief detail read this article. Page ID don’t come in quotes, … Read more
Your hook already gives you user id, you don’t need to $current_user. add_action (‘user_register’, ‘mailboxNumberGenerator’, 10, 1); function mailboxNumberGenerator($user_id) { $initialMailboxNum = 100000; $user_query = new WP_User_Query( array( ‘role’ => ‘Customer’ ) ); $user_query2 = new WP_User_Query( array( ‘role’ => ‘Subscriber’ ) ); $currentMailboxNum = $initialMailboxNum + $user_query->get_total() + $user_query2->get_total(); $newMailboxNum = $currentMailboxNum + 1; … Read more
Dont pass plain text as password, use this function: wp_set_password( $password, $user_id ); Keep in mind that it should only be run on user creation (so just once), otherwise the password might keep changing.
No, hooks have nothing to do here, all the emails you mentioned (WordPress Gravity Forms and WooCommerce) use the same function wp_mail. I strongly believe this is blocked outside of WordPress, and I suggest you use a SMTP server with a real email address, you can use Postman SMTP Mailer/Email Log which will also help … Read more