• Resolved brentrobinson

    (@brentrobinson)


    Hi,

    I’m using WordPress v 4.5.3 and a child theme of Sensible-WP v 1.2.5 (free theme with no support)

    The problem is:
    – With MSIE 11 and Safari 5.1.7 (latest version), the Home page loads twice: (a) the first time the Home page is visited OR (b) when the user refreshes (F5) the browser window (on the Home page).
    – The MSIE browser tab displays the message: “Waiting for _website_domain_name_”. But I don’t know how to find out what is causing this “Waiting for _website_domain_name_” message. (I’m not a programmer or developer.)

    The other web pages do not have this problem. This problem does not occur with Chome, Firefox or Opera. This problem does not occur on my localhost server on Windows 8.1.

    The site is at https://tinyurl.com/zqktouo

    The site:

    – includes a site logo (that links to the Home page) and site name and tagline
    – includes a link to “Home” in the navigation menu
    – has a static Home page (that uses the page.home.php template shown below)
    – does not have a blog portion

    I tried to no avail to:
    – deactivate all plugins (and even rename the plugins directory). The only plugins are Contact Form 7, and Yoast SEO.
    – rename (to temporarily disable) the google xml site map file in the root directory
    – remove the link statement to google fonts in header.php

    <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,400i,600,600i,700" rel="stylesheet" type="text/css">

    Below are my header.php and page.home.php files.

    Thank you very much!

    My header.php file is:

    <?php
    /**
     * The header for our theme.
     *
     * Displays all of the <head> section and everything up till <div id="content">
     *
     * @package sensible-wp
     */
    ?><!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <head>
    <meta charset="<?php bloginfo( 'charset' ); ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="profile" href="https://gmpg.org/xfn/11">
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
    <?php wp_head(); ?>
    </head>
    
    <body <?php body_class(); ?>>
    
    	<div id="page" class="hfeed site">
    		<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'sensible-wp' ); ?></a>
    
    	<header id="masthead" class="site-header" role="banner">
        	<div class="grid grid-pad head-overflow">
    			<div class="site-branding">
    
    				<?php if ( get_theme_mod( 'sensiblewp_logo' ) ) : ?>
    
        				<div class="site-logo">
    
           				<a href='<?php echo esc_url( home_url( '/' ) ); ?>' title='<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>' rel='home'><img src='<?php echo esc_url( get_theme_mod( 'sensiblewp_logo' ) ); ?>' <?php if ( get_theme_mod( 'logo_size' ) ) : ?>width="<?php echo esc_attr( get_theme_mod( 'logo_size', __( '200', 'sensible-wp' ) )); ?>"<?php endif; ?> alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>"></a>
    
    </div><!-- site-logo --> 
    
                      		<?php else : ?>
    
        				<hgroup>
    
    					<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?>
    <img src="/img/logo.jpg" height="196" width="250"></a></h1>
        				</hgroup>
    
    				<?php endif; ?>
    
    </div><!-- site-branding -->
    
    <hgroup id="site-title-tagline">
    	<h1 class="site-title"><?php bloginfo( 'name' ); ?></h1>
    
    	<div class="tagline-description"><?php bloginfo( 'description' ); ?></div>
    </hgroup><!-- hgroup -->
    
    			<div class="navigation-container">
    
    				<nav id="site-navigation" class="main-navigation" role="navigation">
    
    					<button class="menu-toggle toggle-menu menu-right push-body"><?php _e( '<i class="fa fa-bars"></i> Menu', 'sensible-wp' ); ?></button>
    					<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?> 
    
    				</nav><!-- #site-navigation -->
    
            	</div><!-- navigation-container -->
    
            </div><!-- grid -->
        </header><!-- #masthead -->
    
        <nav class="cbp-spmenu cbp-spmenu-vertical cbp-spmenu-right">
    		<h3><?php _e( 'Menu', 'sensible-wp' ); ?></h3>
    		<?php wp_nav_menu( array( 'theme_location' => 'primary', 'depth' => '2' ) ); ?>
    	</nav>
    
    	<section id="content" class="site-content">

    My page.home.php file is:

    <?php
    /**
    Template Name: Home Page
     *
     * @package sensible-wp
     */
    
    get_header(); ?>
    
    		<?php if( get_theme_mod( 'active_hero' ) == '') : ?>
    
            	<section id="hero-header" data-speed="8" data-type="background" style="background: url('<?php echo esc_url( get_theme_mod( 'sensiblewp_main_bg', ( get_stylesheet_directory_uri( 'stylesheet_directory') . '/img/hero-1.jpg'))); ?>')  50% 0 no-repeat fixed;">
                	<div class="hero-content-container">
                    	<div class="hero-content">
    
                                <span>
    
                                <?php if ( get_theme_mod( 'sensiblewp_first_heading' ) ) : ?>
    
                   					<h2 class="animated fadeInDown delay"><?php echo esc_textarea( get_theme_mod( 'sensiblewp_first_heading')) ?></h2> 
    
    							<?php endif; ?> 
    
                                <?php if ( get_theme_mod( 'sensiblewp_hero_button_text' ) ) : ?>
    
                                	<?php if ( get_theme_mod( 'hero_button_url' ) ) : ?>
    
                        				<a href="<?php echo esc_url( get_page_link( get_theme_mod('hero_button_url'))) ?>" class="featured-link"> 
    
    								<?php endif; ?>
    
                        			<?php if ( get_theme_mod( 'page_url_text' ) ) : ?> 
    
        								<a href="<?php echo esc_url( get_theme_mod ( 'page_url_text' )) ?>" class="featured-link" target="_blank">
    
    								<?php endif; ?> 
    
                                			<button class="wow animated fadeInDown delay">
    											<?php echo esc_html( get_theme_mod( 'sensiblewp_hero_button_text')) ?>
                                			</button>
    
                                		</a>
    
                                <?php endif; ?> 
    
                    			</span>
    
                	</div><!-- hero-content -->
            	</div><!-- hero-content-container -->
            </section><!-- hero-header -->	
    
    	<?php endif; ?>
    
    	<?php if( get_theme_mod( 'active_social' ) == '') : ?>
    
            	<?php if ( get_theme_mod( 'social_text' ) ) : ?>
            		<div class="social-bar">
            	<?php else : ?>
            		<div class="social-bar-none">
            	<?php endif; ?> 
    
            		<div class="grid grid-pad">
            			<div class="col-1-1">
    
                    	<?php if ( get_theme_mod( 'social_text' ) ) : ?>
    
                            <span class="wow animated fadeIn"><?php echo wp_kses_post(get_theme_mod( 'social_text' )); ?></span> 
    
    					<?php endif; ?> 
    
                            <div class="wow animated fadeIn">
    
                                <?php get_template_part( 'content', 'social' ); // Social Icons ?> 
    
                            </div>   
    
                    	</div><!-- col-1-1 -->
            		</div><!-- grid -->
    
            	<?php if ( get_theme_mod( 'social_text' ) ) : ?>
            		</div><!-- social bar -->
            	<?php else : ?>
            		</div><!-- social bar -->
            	<?php endif; ?>
    
    		<?php endif; ?>       
    
            <?php if( get_theme_mod( 'active_intro' ) == '') : ?>  
    
            	 <?php get_template_part( 'content', 'intro' ); // intro ?> 
    
    		<?php endif; ?>
    
            <?php if( get_theme_mod( 'active_services' ) == '') : ?>    
    
            	<?php get_template_part( 'content', 'services' ); // services ?> 
    
    		<?php endif; ?>
    
            <?php if( get_theme_mod( 'active_blog' ) == '') : ?> 
    
            	<?php get_template_part( 'content', 'news' ); // news ?> 
    
    		<?php endif; ?>
    
            <?php if( get_theme_mod( 'active_team' ) == '') : ?>   
    
            	<?php get_template_part( 'content', 'team' ); // team ?>
    
    		<?php endif; ?>
    
            <?php if( get_theme_mod( 'active_home_widget' ) == '') : ?>
    
            	<?php get_template_part( 'content', 'home-widget' ); // home widget ?> 
    
    		<?php endif; ?>
    
    <div class="floating-top-box">
    <a title="top of page" href="#masthead">&uarr;&nbsp;&nbsp;Top</a>
    </div>
    
    <?php get_footer(); ?>

    Thank you very much.
    BR

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter brentrobinson

    (@brentrobinson)

    One more thing…I’ve submitted this website’s URL to google search engine to improve the site’s search ranking. So ‘google search’ is monitoring this site (and this Home page). Could this be causing this problem?

    Thank you.
    BR

    hello,

    you can try meta headers in headers aka

    ie=content edge and so

    it works quite well with safari too

    on worst case, try modernizer js library,

    it emulates most old or buggy browsers with HTML 5

    To conclude, i might be wrong but i do think this is a front-end issue, no problem with your php code.

    Thread Starter brentrobinson

    (@brentrobinson)

    Digico, thank you very much for your reply.

    I’m not a programmer or web developer so I don’t know which specific < meta > tags to add to header.php to address this problem for MEIE and Safari.

    I tried adding this meta tag but it does not fix the problem with MS IE:

    `<meta http-equiv=”X-UA-Compatible” content=”IE=edge” />’

    Is the above meta tag correct?

    Which specific meta tag should I add to address this problem in _Safari on Windows_?

    (I won’t be able to try your suggestion to use the modernizer js library because I don’t know anything about JS or JS libraries, etc. Sorry. So I hope your meta tag additions can solve this problem.)

    Thank you.
    BR

    Thank you.

    hi again, sorry with no examples,

    try this specific one, it should try to use chrome engine even on ie or safari:

    in header of html

    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    the order doesn’t matter as long in <head> </head> tags

    if this doesn’t solve your issue, you could load shiva

    https://github.com/aFarkas/html5shiv/

    in general it’s a js to be called (also in header).

    Please note these are fixes for OLD browsers. Firfox, Opera, Chrome don’t need it at all. Safari has a strange behaviour when it comes to DOM and JD and CSS, so all these solutions could eventually work for the apple webkit implementation.

    Thread Starter brentrobinson

    (@brentrobinson)

    Hi,
    I appreciate your suggestions, which led me down a path to a solution:

    Remove all animation-related class declarations from the relevant php templates, and add the animation elements to the stylesheet. (I cannot explain why these 2 browsers work correctly in this scenario.)

    Thanks again.
    BR

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Home Page loads twice w/MSIE and Safari’ is closed to new replies.