Is wp_login_form secure on a non secure page?
It doesn’t matter what function you use to generate the form markup, if you write the code by hand, or if it’s in a modal or not. For it to be secure, you absolutely need an SSL certificate.
It doesn’t matter what function you use to generate the form markup, if you write the code by hand, or if it’s in a modal or not. For it to be secure, you absolutely need an SSL certificate.
You can use the logged-in class added by body_class to target your CSS rules. .container { height: 160px } body.logged-in .container { height: 30px }
I gave up on plugins awhile ago to customize the WordPress login. I now create a plugin that links custom CSS into my theme and edit everything myself giving me greater control over the login style. Back in the day most would add to the functions.php file in the current themes directory but now I … Read more
Here is a short plugin that adds the interim-login lightbox on every frontend page: <?php /* Plugin Name: Interim Login Everywhere Version: 1.0.1 Plugin URI: http://nowhere.com Description: Provide interim login screens on all pages. Author: S Valentine */ function ile_enqueue_scripts() { // we only care to add scripts and styles if the user is logged … Read more
In general you can change where items link with WP Constants. But according to get_admin_url() it’s possible the URL was filtered with admin_url in which case you might be able to add a filter with a high priority and override what is being sent. The default is; $url = get_site_url($blog_id, ‘wp-admin/’, $scheme); if ( $path … Read more
The login_redirect hook does seem to be the right hook. Can you try this : (Adapted from the Codex ) function redirect_users_by_role( $redirect_to, $request, $user ) { if ( isset( $user->roles ) && is_array( $user->roles ) ) { if ( in_array( ‘staff’, $user->roles ) ) { if ($admin_url === $request){ return home_url(‘/resources’); } else{ return … Read more
No, you shouldn’t, it’s deprecated I don’t think wp_signon() can fill my needs in the same way wp_login() can It does the exact same thing, but with a few new features I read this runs after the login of a user and contains 2 parameter of which one is the username. With the username I … Read more
OK, it wasn’t easy to catch, but… There is one major problem in your code… First check you make is: if ( is_user_logged_in() == 1 ) { And is_user_logged_in() is based on global $current_user variable. But… As you can read in login_redirect hook docs: The $current_user global may not be available at the time this … Read more
There are few scenarios you have to consider. 1. Obtaining your password from database This is almost impossible to do. WordPress stores all passwords as hashes. When you log in, the password you’ve entered in form is hashed and compared with the hash stored in DB. This way you can check if the password is … Read more
If you have your site footer and masthead (e.g. including main menu, hero image, etc.) HTMLs as separate template files, you could bascially include them on the default login page like this, add_action(‘login_head’,function(){ get_template_part( ‘site-header’ ); }); add_action(‘login_footer’,function(){ get_template_part( ‘footer’ ); }); I wouldn’t use get_header and get_footer directly as they probably contain some extra … Read more