BuddyBoss Home – Web › Support Forums › Themes › BuddyBoss theme › Login Page – Remove Logo – Not Login Page Header
- This topic has 3 replies, 2 contibutors, and was last updated 9 years, 10 months ago by Alyssa.
Question
January 21, 2015 at 1:28 pm #34918@ry-macI am having the same issue that @tmg2014 had asked about in the previous post:
<a href=”http://`www.buddyboss.com/support-forums/topic/how-to-remove-logo-from-log-in-page/” title=”how-to-remove-logo-from-log-in-page” target=”_blank”></a>
I tried @tjchester ‘s suggestion:
add_action('login_enqueue_scripts','hide_logo'); function hide_logo(){ echo '<style> #login h1{display:none;} </style>'; }
It worked like a charm! It got rid of the logo… Well, it got rid of the entire login header all together! Please see pic.
Still learning WordPress, and BuddyBoss for that matter, but it seems like there should be a way to add an adjustment to the original code, which I believe is in the
theme-functions.php
code in the buddyboss-inc folder. Please correct me if I’m wrong! As I said I am still learning.The code in
theme-functions.php
is as follows:/** * Custom Login Logo * * @since BuddyBoss 1.0 */ function buddyboss_custom_login_logo() { $logo = get_theme_mod( 'buddyboss_logo', FALSE ); /*convert from relative url to absolute url*/ $scheme = is_ssl() ? 'https://' : 'http://'; $logo_absolute_url = $scheme . @$_SERVER['HTTP_HOST'] . $logo; if ( $logo ) { if ( !0 ) { list( $width, $height ) = getimagesize( $logo_absolute_url ); echo '<style type="text/css"> #login h1 a { background-image: url('.esc_url($logo).'); background-size: '.intval($width).'px '.intval($height).'px; min-height: 87px; min-width: 326px; width: '.intval($width).'px; height: '.intval($height).'px; overflow: hidden; } body.login { background: #fff !important; } .login form { -webkit-box-shadow: 0 1px 3px rgba(0,0,0,.3); -moz-box-shadow: 0 1px 3px rgba(0,0,0,.3); box-shadow: 0 1px 3px rgba(0,0,0,.3); } </style>'; } } } add_action( 'login_head', 'buddyboss_custom_login_logo' ); /** * Custom Login Link * * @since BuddyBoss 1.0.8 */ function change_wp_login_url() { return home_url(); } function change_wp_login_title() { get_option('blogname'); } add_filter( 'login_headerurl', 'change_wp_login_url' ); add_filter( 'login_headertitle', 'change_wp_login_title' );
My Questions:
Shouldn’t I just be able to either add that code to thefunctions.php
file in my buddyboss-child theme and kill the undesired code? Or am I supposed to copy thetheme-functions.php
file and the buddyboss-inc folder into my buddyboss child theme and make the mods there?Either way, please advise on proper method and suggested code to remove the logo from the login page.
Pretty much I want the default WordPress logo when arriving at my login page without the custom logo added to my login.
However, I would like to keep the logo (or what i would normally call a “Header” picture) that I choose for the website header area.
Any and all help would be greatly appreciated.
Thanks.
Mac
Answers
January 21, 2015 at 4:02 pm #34928@alyssa-buddyboss
AlyssaParticipant@ry-mac Welcome to the BuddyBoss community! In the function above we are using a hook, so all you need to do is remove the hook in your child theme functions.php file by adding this code:
function remove_login_logo(){ remove_action( 'login_head', 'buddyboss_custom_login_logo' ); } add_action( 'init' , 'remove_login_logo' );
January 22, 2015 at 8:57 am #34941@ry-mac@tjchester,
Perfect! Thanks for the quick response and the perfect answer!
Consider request solved!
January 22, 2015 at 2:47 pm #34943@alyssa-buddyboss
AlyssaParticipantGreat, thanks!
- The question ‘Login Page – Remove Logo – Not Login Page Header’ is closed to new replies.