G
G
Grisha Nikolsky2015-12-05 16:11:34
WordPress
Grisha Nikolsky, 2015-12-05 16:11:34

Custom Login VS. Native Login | Who cares?

Hello. Everyone knows that WordPress has its own Login form, and also has hooks for all occasions. But on the Internet, I saw several solutions for creating Membership sites :
Somewhere they just took the native WordPress form, changed its CSS and redirected it to the same personal account using hooks. ( Example )
And somewhere they completely rewrote this form. ( Example )
Question: Why is this being done? The second way is more difficult, but I do not see the difference.
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Chesnokov, 2015-12-06
@VoxelGod

This is done purely for aesthetic reasons. There is no significant difference. Personally, I leave the native form at the native address, but I always change the logo, and sometimes I add "captcha".
Might be useful to someone:

function my_login_logo() { 
?>
<style type="text/css">
body.login div#login h1 a {
    background-image: url(<?php echo get_bloginfo( 'template_directory' ) ?>/assets/img/login_logo.png);
    height: 150px;
    margin-left: 0px;
    width: 310px;
    padding-bottom: 0px;
    margin-bottom: 0px;
    background-attachment: scroll;
    background-repeat: no-repeat;
    background-position: center top;
    background-size: auto;
}
</style>
<?php 
}
add_action( 'login_enqueue_scripts', 'my_login_logo' );

function my_login_logo_url() {
    return get_bloginfo( 'url' );
}
add_filter( 'login_headerurl', 'my_login_logo_url' );

function my_login_logo_url_title() {
    return 'my login logo url title...';
}
add_filter( 'login_headertitle', 'my_login_logo_url_title' );

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question