Welcome! To use this support forum, please Login or Join Today!

   

Custom Admin Login

{name}
Rank

Total Posts: 20

Joined 2013-12-11

PM

 
I'm trying to customize my admin login form for my Mobius theme by following the steps from this link: http://codex.wordpress.org/Customizing_the_Login_Form

I'm using the code from the "Styling Your Login" section and inserted the code below in my child theme.

function my_login_stylesheet() {
    wp_enqueue_style
'custom-login'get_template_directory_uri() . '/style-login.css' );
    
wp_enqueue_script'custom-login'get_template_directory_uri() . '/style-login.js' );
}
add_action
'login_enqueue_scripts''my_login_stylesheet' ); 


However, I created a folder in my active Modius child theme called 'login' where the 'style-login.css' file is at. So my function file actually has this:

function my_login_stylesheet() {
    wp_enqueue_style
'custom-login'get_template_directory_uri() . '/login/style-login.css' );
    
wp_enqueue_script'custom-login'get_template_directory_uri() . '/login/style-login.js' );
}
add_action
'login_enqueue_scripts''my_login_stylesheet' ); 


None of my styles are working and when I inspect my page I notice that the style sheet is actually being inserted into the <body></body> tag versus in the <head></head> of the document.

Can you help me locate what I'm missing? Thanks.
{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 
It looks like the styles are pulling from the parent theme.
If you want to load your JS/CSS files from the child theme directory, just change:

get_template_directory_uri
to:
get_stylesheet_directory_uri
{name}
Rank

Total Posts: 20

Joined 2013-12-11

PM

 
That did the trick...thanks Casey!