0

I am trying to make custom login page by adding 1 in functions.php and 2 into theme folder. but I can't even execute the theme. I can activate the theme without 1 and 2. However, the site goes frozen both way trying to update the functions.php after pushing 2 to server and modifying the functions.php on dashboard, and trying to activate the theme after pushing the theme including 1,2 to server. The file is available at www.lastech.com.au/green.zip I tried so many different way to sort this out but it is not working. I spent almost a week. Please help me guys!

1.

function custom_login() { 
echo '<link rel="stylesheet" type="text/css" href="'.get_bloginfo('template_directory').'/custom-login.css" />'; 
}
add_action('login_head', 'custom_login');

2.

custom-login.css file

My file is available at www.lastech.com.au/green.zip

Regards

BK

  • 1
    could you please clarify the question what exactly is the problem? – Brooke. Mar 28 '12 at 7:14
1

What i do is create a page normally in the dashboard, call it something like 'login', then use filters to replace the wordpress login url:

/**
* change http://www.google.ie to the url to your custom page, or anything you like
* @return string
*/
function my_login_url(){
    return "http://www.google.ie";
}
add_filter('login_url', 'my_login_url');

make sure you include it somewhere near the top of your functions file for themes or the index.php plugin_name.php file for plugins.

then anywhere in the wordpress blog wp_login_url() is called, using the above example, it will give a link to: 'http://www.google.ie'

Just came across this for renaming wp-admin: http://wordpress.org/support/topic/anyone-tried-wp-reloaded

0

Replace the above with this:

    // Custom login css
function my_custom_login() {        
    echo "<link rel='stylesheet' href='". get_bloginfo('template_directory') ."/custom-login.css' type='text/css' media='screen' />\n";
}
add_action('login_head', 'my_custom_login');

    // Change the logo url from wordpress to the one you want   
function login_url(){       
    return home_url();      
}
add_filter('login_headerurl', 'login_url');

// Change the logo title from standard to the blog name
function login_title(){
    return get_bloginfo('name');
}
add_filter('login_headertitle', 'login_title');
  • You should have a look at the differences between actions and filters. – chrisguitarguy Mar 28 '12 at 13:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.