This topic has 3 replies, 2 voices, and was last updated 8 years by Kieran_SQ.

  • Author
  • #182363
     Grant
    Participant

    Hi Guys,

    Hopefully this will be a quick and easy one.

    Using the default theme settings, when you place the site in ‘Maintenance mode’, my logo expands off the page in a Mobile view. See attached. Desktop and Tablet is fine.

    I just want to restrict the width of the logo to the center of the display and ideally change the background of the page display to #fff.

    Usually I can work out CSS solutions, but I’m definitely missing something that seems to change when the site is put in maintenance mode.

    Cheers,

    Grant

    #182441
     Kieran_SQ
    Moderator

    Hi Grant,

    Thanks for contacting us about customizing the maintenance page, you can use the below snippet in your KLEO Child theme’s functions.php file to alter the output, including the image size.

    COPY CODE
    // Change the maintenance page logo size
    if ( ! function_exists( 'kleo_maintenance_mode' ) ) {
    	function kleo_maintenance_mode() {
    
    		$logo_path = apply_filters( 'kleo_logo', sq_option_url( 'logo' ) );
    		$logo_img  = '<img src="' . $logo_path . '" alt="maintenance" style="margin: 0 auto; display: block; max-width:100px;" />';
    
    		if ( sq_option( 'maintenance_mode', 0 ) == 1 ) {
    
    			/* Theme My Login compatibility */
    			if ( class_exists( 'Theme_My_Login' ) && Theme_My_Login::is_tml_page( 'login' ) ) {
    				return;
    			}
    
    			if ( ! current_user_can( 'edit_themes' ) || ! is_user_logged_in() ) {
    				wp_die(
    					$logo_img
    					. '<div style="text-align:center">'
    					. sq_option( 'maintenance_msg', '' )
    					. '</div>',
    					get_bloginfo( 'name' )
    				);
    			}
    		}
    	}
    
    	add_action( 'get_header', 'kleo_maintenance_mode' );
    }

    Please change the value for max-width:100px; to suit your needs.

    Thanks,

    Kieran

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #182475
     Grant
    Participant

    Hi Kieran,

    Thanks very much. It does the job nicely.

    Cheers!

    #182477
     Kieran_SQ
    Moderator

    Hey Grant,

    As always you’re most welcome, feel free to open a new ticket any time with more questions and we’ll be happy to help.

    All the best,

    Kieran.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 4 posts - 1 through 4 (of 4 total)

The forum ‘Bugs & Issues’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?