New answers tagged

1

We can utilize the add_term_relationship action to check if the current post is already assigned as popular. add_term_relationship fires before a term is inserted. I also think that you are using the wrong hook here to send your mail on. added_term_relationship fires quite early before any error checking. You can still encounter a failure after ...


1

Here is another approach in which we can answer the question, here is a small Plugin that adds a Submenupage for "Users", containing a small form where you can enter a username to create the new user with no emailadress. Additional Error handling allows you to see if the current user already exists, as usernames have to be unique. Create a ...


0

There is a function that lets you enter users without any email address at all! If that's what your looking for? Just put this piece of code in your functions.php // Remove required email address in user profile function remove_empty_email_error( $arg ) { if ( !empty( $arg->errors['empty_email'] ) ) unset( $arg->errors['empty_email'] ...


0

That is not possible in an easy way, as WordPress always checks if the Emailadress is already used. function email_exists( $email ) { if ( $user = get_user_by( 'email', $email) ) { return $user->ID; } return false; } This function is also not filterable, so there is no way around in this direction. What you could do, however, is ...


0

I did it the long way, with help from a related WordPress.org support thread: add_action('comment_post', 'notify_author_of_reply', 10, 2); function notify_author_of_reply($comment_id, $approved){ $comment = get_comment($comment_id); $post_id = $comment->comment_post_ID; $post = get_post($post_id); if($approved && (get_post_type( ...


0

By default, WordPress is not equipped to be an email server. It can send email but does not receive email. If you want to send mail to multiple recipients then wp_mail will allow you to specify multiple addresses. <?php $multiple_recipients = array( 'example@example.com', 'website@wordpress.com' ); $subj = 'The email subject'; $body = 'This is ...


-1

Hope the below mentioned plugin will help you : WP Easy SMTP Then you will need to configure the SMTP settings with it.


0

You can create usermeta at time of insert user like, i create zip code in my site see this code, $user_id = wp_insert_user( array( 'user_login' => $user_email, 'user_pass' => wp_generate_password ( 12, false ), ...



Top 50 recent answers are included