Every tutorial I've seen on this subject is out of date, so I'm hoping someone here can help me.
I want to style my wp-login.php page with a CSS file. But I'd like to do it in a way that won't get overwritten when Wordpress is updated. From what I can tell, based on the tuts I've read, the best way it to add it using a function in my themes functions.php file. Unfortunately, the code that people have suggested using just doesn't work for me. Here's the code that I've added.
<?php
function custom_login() {
echo '<link rel="stylesheet" href="wplogin/wplogin.css" />';
}
add_action('login_head', 'custom_login');
?>
It does include the stylesheet like I want, but unfortunately I get this error on my page.
Warning: Cannot modify header information - headers already sent by (output started at /home/skyyprod/gointrigue/sandbox/wp-content/themes/rockwell_v1.6/functions.php:899) in /home/skyyprod/gointrigue/sandbox/wp-login.php on line 353
Warning: Cannot modify header information - headers already sent by (output started at /home/skyyprod/gointrigue/sandbox/wp-content/themes/rockwell_v1.6/functions.php:899) in /home/skyyprod/gointrigue/sandbox/wp-login.php on line 365
What am I doing wrong?