Remove wp-login link from auto generated wordpress’s email

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

Redirect after empty register form

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

sort Posts by custom user filed

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

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