Register author, facebook connect, publish posts from front end
Register author, facebook connect, publish posts from front end
Register author, facebook connect, publish posts from front end
Are you referring to the email sent after new subscriber registered to the site? If so, it is a pluggable function, which means you can over ride it as you need. Put this code in your theme functions.php. if( ! function_exists(‘wp_new_user_notification’) ) { function wp_new_user_notification($user_id, $plaintext_pass) { $user = new WP_User($user_id); $user_login = stripslashes($user->user_login); $greetings … Read more
Because I was trying to make the redirect happen using shortcode in the registration and I didn’t get the answer which can delay the redirect until I add custom textarea fields date to user profile page before this step $userID = wp_insert_user( $userDataArr ) , I have no user ID yet, so I can’t do … Read more
Multisite – User creation for second site from first site?
You have two big issues here are a few minor ones and some room for improvement. Lets look at your major mistakes first What you have done well is to add your output to a variable and then returning the variable in the end. Shortcodes should always return their output, not echo it. What you … Read more
I think I found the solution myself. When I adjusted the declaration of the registration form: <form name=”registerform” id=”registerform” action=”<?php echo esc_url( site_url(‘wp-login.php?action=register’, ‘login_post’) ); ?>” method=”post” novalidate=”novalidate”> To the following: <form name=”registerform” id=”registerform” action=”<?php echo esc_url( site_url(‘wp-login.php?action=register&role=”.$_GET[“role’], ‘login_post’) ); ?>” method=”post” novalidate=”novalidate”> Then my problem is solved and the registration page is not redirected … Read more
$return_string .= get_the_post_thumbnail(); should be: $return_string .= get_the_post_thumbnail( get_the_ID() );
Login user after registration programmatically
Update: I’ve got it working now! It still shows a text box that says the User email must be confirmed, but it DOES create the user regardless of that information. Here is the code I have used: function your_disable_activation( $user, $user_email, $key, $meta=”” ) { // Activate the user $user_id = wpmu_activate_signup( $key ); wp_redirect( … Read more
So, if you want to display only posts on your homepage, which interests the logged in user, you can use the pre_get_posts-Action: add_action( ‘pre_get_posts’, ‘wp123234_user_specific_loop’ ); function wp123234_user_specific_loop( $query ){ if( ! is_user_logged_in() ) //Just return, if the user is not logged in. return; if( ! $query->is_main_query() ) //If its not the main query return … Read more