I'm trying to change the default Wordpress login/signup page by doing this:

Adding this code anywhere in function.php file of my theme:

function custom_login_css() {
echo '<link rel="stylesheet" type="text/css" href="'.get_stylesheet_directory_uri().'/login/login-styles.css" />';
add_action('login_head', 'custom_login_css');

Creating a /login directory in my theme's folder and put login-styles.css in it and save it.

 .login form {
  border: 1px solid rgba(0,0,0,.2);
  background-clip: padding-box;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 13px 3px rgba(0,0,0,.5);
  overflow: hidden;

When I try to load http://www.mscaspian.com/store/wp-login.php I get:

<link rel="stylesheet" type="text/css" href="http://www.mscaspian.com/store/wp- content/themes/blaszok/login/login-styles.css" />

above the page instead of applying to the page.

  • Please clean up your code and add it in a code block. Also don't use the wordpress.org tag Jul 21, 2014 at 13:16
  • some of it didn't fit but i'll try again. what tags do you suggest? i couldn't find any relevant tags.
    – user51354
    Jul 21, 2014 at 13:19

1 Answer 1


The &lt; at the start and the &gt; at the end cause the problem when echoing in your custom_login_css function. Replace them with < >.

The &lt; and &gt; are HTML entities meaning that if you want to print to your page a HTML reserved character you have to use this entities so the browser will understand that you don't want to use the HTML characters as code but to display it.

More about HTML entities : https://en.wikipedia.org/wiki/HTML_entity

  • yes it worked. i didn't know what those characters are used for until now. Great answer. thank you!!
    – user51354
    Jul 21, 2014 at 13:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.