New Landing How can we help? Themeforest Theme Support Dante Seeing maintenance page as admin

Viewing 15 posts - 16 through 30 (of 30 total)
  • Posted in: Dante
  • #155625
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi @marcgu,

    Can’t seem to find any reason at all why this would be so, unless it’s something hosting specific which is causing the WordPress permissions functions to return false values. If you enable the included child theme, and then add this code to the functions.php file, it will remove the admin check and just set it to display the message for logged out users:

    function sf_maintenance_mode() {
    			$options = get_option('sf_dante_options');
    			$custom_logo = $custom_logo_output = $maintenance_mode = "";
    			if (isset($options['custom_admin_login_logo'])) {
    			$custom_logo = $options['custom_admin_login_logo'];
    			}
    			if ($custom_logo) {		
    			$custom_logo_output = '<img src="'. $custom_logo .'" alt="maintenance" style="margin: 0 auto; display: block;" />';
    			} else {
    			$custom_logo_output = '<img src="'. get_template_directory_uri() .'/images/custom-login-logo.png" alt="maintenance" style="margin: 0 auto; display: block;" />';
    			}
    	
    			if (isset($options['enable_maintenance'])) {
    			$maintenance_mode = $options['enable_maintenance'];
    			} else {
    			$maintenance_mode = false;
    			}
    			
    			if ($maintenance_mode == 2) {
    				
    				$holding_page = __($options['maintenance_mode_page'], 'swiftframework');
    			    $current_page_URL = sf_current_page_url();
    			    $holding_page_URL = get_permalink($holding_page);
    			    
    			    if ($current_page_URL != $holding_page_URL) {
    			    	if ( !is_user_logged_in() ) {
    			    	wp_redirect( $holding_page_URL );
    			    	exit;
    			    	}
    			    }
    		    
    		    } else if ($maintenance_mode == 1) {
    		    	if ( !is_user_logged_in() ) {
    		    	    wp_die($custom_logo_output . '<p style="text-align:center">'.__('We are currently in maintenance mode, please check back shortly.', 'swiftframework').'</p>', get_bloginfo( 'name' ));
    		    	}
    		    }
    		}
    		add_action('get_header', 'sf_maintenance_mode');

    Hope that helps.

    – Ed

    #155633
    Marcgu
    Member
    Post count: 31

    Hi Ed,

    Thanks! I quickly tried to do so now, but the code seemed to only mess up my admin panel… :/ Will continue trying on Monday, I’ll get back to you then!

    #155651
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779
    This reply has been marked as private.
    #155756
    Marcgu
    Member
    Post count: 31
    This reply has been marked as private.
    #156049
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    yes, but I couldn’t login.
    Need the ftp servername. Is it http://ftp.one.com ?

    -Rui

    #156052
    Marcgu
    Member
    Post count: 31
    This reply has been marked as private.
    #156120
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    This is not working.
    https://www.dropbox.com/s/evd8h0dgq9hxwro/ftp_settings.png?dl=0

    Please test it before providing it. Contact you host if you are not sure what are the ftp account details.

    -Rui

    #156499
    Marcgu
    Member
    Post count: 31
    This reply has been marked as private.
    #156681
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    Managed to login with those ftp details but unfortunately didn’t found anything that could cause in your files structure.

    Maybe it’s better to start in a fresh install.

    -Rui

    #156730
    Marcgu
    Member
    Post count: 31

    Alright, thanks nonetheless! And you mean only reinstalling the theme right?

    If I do that, then I guess the only things I have to redo is the theme-specific options. As long as all pages remain the same in ‘swift page builder’, that’s very manageable!

    #157289
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Yes, you can try that. If it doesnt work it’s because it’s an higher problem with your WordPress install.

    -Rui

    #157524
    Marcgu
    Member
    Post count: 31

    Problems are pretty much fixed now! Thanks guys 🙂

    #157538
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Ok great! No problem

    #157853
    Marcgu
    Member
    Post count: 31

    Sorry to bother you so soon again, but I have three very small questions now! Seemed best to ask them in my current thread.

    1. I would like to make the height of the full-width text blocks on the homepage smaller; using extra classes I couldn’t get it small enough, but with the following code (found on your forum) I could:

    .full-width-text {
      padding-bottom: 20px;
      padding-top: 20px;
    }

    Problem was, the height of all headings on the website changed with this code and I only want it to affect the full-width text blocks on the homepage… but how?

    2. For those same text blocks, there is an arrow on the bottom of each. We like that, but on some computers there appears to be a white line separating the arrow from the text block’s background. Is there a way to make this white line disappear?

    3. And finally, is there perhaps a code to make the titles of blog posts appear in bold on the main ‘blog page’? I think they need some extra weight, since we don’t use any thumbnails.

    Thanks a lot!!

    #157860
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    As they are different issues please open a separate thread

    – Kyle

Viewing 15 posts - 16 through 30 (of 30 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register