Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1121424
    gignnn
    Participant

    Hello,

    I am interested in customizing my WordPress site’s login page, but I don’t know the best method for completing this. I understand that editing core WP files is a terrible idea and want to follow WordPress Best Practices to complete the proper modifications. To give you an example of how I want my login page to look, I did go ahead and temporarily edit core WordPress files on another website I own for which I have your theme licensed to, which can be seen here:

    Temporarily Modified Site: http://retailnnnproperties.com/wp-login.php

    Unmodified Site: http://nnnpropertiesgroup.com/wp-login.php

    I tried inspecting elements on the modified site’s login page and copying that CSS into the X Theme’s CSS Customization page, but that didn’t seem to work. Any help you can offer me in completing this customization would be greatly appreciated.

    #1121447
    Lely
    Moderator

    Hi There,

    To do that, please create login.css file on your child theme root folder. Add the custom CSS for your login page on that file. Then add the following code on your child theme’s functions.php so we can enqueue that stylesheet file on the login page.

    function login_style() {
        wp_enqueue_script( 'theme_style', get_stylesheet_directory_uri() . '/login.css', array( 'jquery' ), '1.0', true );
    }
    
    add_action('login_enqueue_scripts', 'login_style');
    

    Hope this helps.

    #1122595
    gignnn
    Participant
    This reply has been marked as private.
    #1122715
    Darshana
    Moderator

    Hi there,

    You can follow this resource for more information (https://codex.wordpress.org/Customizing_the_Login_Form).

    Also please provide us with URL to the site that you have implemented the code.

    Thanks!

    #1122722
    gignnn
    Participant
    This reply has been marked as private.
    #1122758
    gignnn
    Participant

    Sorry, I just noticed an unrelated issue. I am interested in changing the permalink for your “blog” from blog to “news”.

    However, when I try to change the permalink, the change isn’t recognized. I have tried clearing the cache multiple times to see if this was causing the issue, to no avail unfortunately.

    Is it possible to change the blog permalink? Thanks.

    #1123111
    Friech
    Moderator

    Hi There,

    Edit your blog page and rename it to “news”, also change its permalink to “news”. Then navigate to Settings > Reading and set the “news” page as the Posts page then save.

    Regarding the custom login, you can utilise the white label extension instead to style your login page.

    Hope it helps, Cheers!

    #1123211
    gignnn
    Participant

    Thanks! Unfortunately, I just checked out the White Label add-on and don’t see where I am supposed to add the custom CSS to change the style of the buttons to match my theme. Could you advise me on how to do this? Thanks.

    #1123218
    gignnn
    Participant

    I’m sorry, but changing the permalink and posts page as instructed is not solving the issue — when I click the page link in the navigation bar, I am still getting redirected to nnnpropertiesgroup.com/blog/ rather than /news/. I have tried emptying the cache multiple times with no luck.

    #1123333
    Christopher
    Moderator

    Hi there,

    Please add this code to child theme’s functions.php file :

    function my_login_stylesheet() {
        wp_enqueue_style( 'custom-login', get_stylesheet_directory_uri() . '/style-login.css' );
    }
    add_action( 'login_enqueue_scripts', 'my_login_stylesheet' );

    create a file in x-child folder and name it style-login.css, insert following code there :

    form#loginform p.galogin {
        float: center!important;
        border-color: #1b52a0!important;
        background-color: #0645a0;
        margin-bottom: 0.25em!important;
        text-shadow: 0 0.075em 0.075em rgba(0,0,0,0.5)!important;
        box-shadow: 0 0.25em 0 0 #1b52a0,0 4px 9px rgba(0,0,0,0.75)!important;
    }
    ody #login .submit #wp-submit {
        float: center!important;
        border-color: #1b52a0!important;
        background-color: #0645a0;
        margin-bottom: 0.25em!important;
        text-shadow: 0 0.075em 0.075em rgba(0,0,0,0.5)!important;
        box-shadow: 0 0.25em 0 0 #1b52a0,0 4px 9px rgba(0,0,0,0.75)!important;
    }

    Under Appearance -> Menus, add ‘News’ page to your navigation.

    Hope it helps.

  • <script> jQuery(function($){ $("#no-reply-1121424 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>