BuddyBoss Home – Web Support Forums Themes BuddyBoss theme Editing the HEADER

Viewing 2 posts - 1 through 2 (of 2 total)
  • Question

    #38910
    @idurston

    How can I centre the header logo?

    Also, how do I use a different logo for the wp admin logo screen. I want to use a long graphic across the middle of my website page in the header above the menu BUT I want just a smal logo for the admin logo page.

    Cheers

    Answers

    #39001

    Alyssa
    Participant
    @alyssa-buddyboss

    @idurston both of these issues are a bit advanced and custom. I can provide limited support here but if you do not know coding well then you may need to hire a developer to do this for you.
    1) Logo: I suggest you use the background-image in this element: .header-inner this will require you to set a fixed height for this element as well. Then you can simply center the image within the element. (all code goes in the custom.css file of your child theme)

    2) Separate logo on the admin page: This requires editing your child theme functions.php file.

    function remove_bb_logo(){
    remove_action( 'login_head', 'buddyboss_custom_login_logo' );
    }
    add_action( 'init' , 'remove_bb_logo' );
    
    function buddyboss_custom_login_logo_redux()
    {
        $logo = '[insert location to your logo here]';
    	
    	/*convert from relative url to absolute url*/
    	$scheme = is_ssl() ? 'https://' : 'http://';
    	$logo_absolute_url = $scheme . @$_SERVER['HTTP_HOST'] . $logo;
    
        if ( $logo ) {
            if ( !0 ) {
                $width = [insert image width];
                $height = [insert image height];
                echo '<style type="text/css">
                        #login h1 a {
                            background-image: url('.esc_url($logo).');
                            background-size: '.intval($width).'px '.intval($height).'px !important;
                            min-height: 87px;
                            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_redux' );
Viewing 2 posts - 1 through 2 (of 2 total)
  • The question ‘Editing the HEADER’ is closed to new replies.