-
Author
-
November 16, 2013 at 23:13 #6772clutchnycParticipant
Hi, I’m trying to create my own customizations for wp-login.php.
I notices that in sweetdate/framework/frontend.php you have this code:
/***************************************************
* Customize wp-login.php
***************************************************/
function custom_login_css() {
global $kleo_sweetdate;
echo '<style>';echo $kleo_sweetdate->get_bg_css('header_background', 'body.login');
echo "\n";
echo '.login h1 a { background-image: url("'.sq_option('logo',get_template_directory_uri().'/assets/images/logo.png').'"); background-size: 250px;width: 326px; min-height: 80px;}';
echo '#login {padding: 20px 0 0;}';
echo '.login #nav a, .login #backtoblog a {color:'.sq_option('header_primary_color').'!important;text-shadow:none;}';echo '</style>';
}
add_action('login_head', 'custom_login_css');function kleo_new_wp_login_url() { return home_url(); }
add_filter('login_headerurl', 'kleo_new_wp_login_url');function kleo_new_wp_login_title() { return get_option('blogname'); }
add_filter('login_headertitle', 'kleo_new_wp_login_title');My question is now can I override this? In my child theme, I want to create my own function for a login-css file for my wp-login.php. My attemps to do this are conflicting with the above code. Any advice is much appreciated!
(I tried putting a copy of framework/Frontend.php in my child theme with the above code removed, but that didn’t work.)
Thank you!!
November 18, 2013 at 23:24 #6866SQadminKeymasterHi,
you can remove our customization with this added to sweetdate-child/functions.phpCOPY CODEadd_action('after_setup_theme', 'my_customizations'); function my_customizations() { remove_action('login_head', 'custom_login_css'); }
Then you can define you own custom code based on ours:
COPY CODEfunction my_custom_login_css() { global $kleo_sweetdate; echo '<style>'; echo $kleo_sweetdate->get_bg_css('header_background', 'body.login'); echo "\n"; echo '.login h1 a { background-image: url("'.sq_option('logo',get_template_directory_uri().'/assets/images/logo.png').'"); background-size: 250px;width: 326px; min-height: 80px;}'; echo '#login {padding: 20px 0 0;}'; echo '.login #nav a, .login #backtoblog a {color:'.sq_option('header_primary_color').'!important;text-shadow:none;}'; echo '</style>'; } add_action('login_head', 'my_custom_login_css');
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
You must be logged in to reply to this topic.