Headers, footer and all styling suddenly missing from site

Hi Guys,

This is super strange. A couple of hours ago my client’s site’s styling, headers and footers all dropped off suddenly.

  • No one was in the site.
  • All themes and plugins are up to date.
  • Wordpress 5.8.1 running.
  • I took a copy of the site and moved it to another host to rule out a hosting discrepancy but still experiencing the same issues on the new host.
  • I’ve checked error reports. Can’t see anything there either.
  • PHP 7.4
  • Tried previous wordpress version to cancel out v5.8.1 causing a problem.

Sending access over to you now.

Thanks in advance for your help :slight_smile:

Claire

Hi Guys :grinning:
Found a clue. Have been testing on a copy on my server and have discovered the child theme is causing the conflict.
Was there a new child theme released with 5.1.2?

Hello @dcc,

Thanks for writing in! The issue is because your base.php file in your child theme is empty. Please remove that file or at least insert the correct content which h should be this:

<?php

// =============================================================================
// VIEWS/HEADER/BASE.PHP
// -----------------------------------------------------------------------------
// Declares the DOCTYPE for the site, includes the <head>, opens the <body>
// element as well as the .x-root <div> and .x-site <div>.
// =============================================================================

$x_root_atts = x_atts( apply_filters( 'x_root_atts', array( 'id' => 'x-root', 'class' => 'x-root' ) ) );
$x_site_atts = x_atts( apply_filters( 'x_site_atts', array( 'id' => 'x-site', 'class' => 'x-site site' ) ) );

?>
<!DOCTYPE html>

<html class="no-js" <?php language_attributes(); ?>>

<head>
  <?php wp_head(); ?>
</head>

<body <?php body_class(); ?>>

  <?php wp_body_open(); ?>

  <?php do_action( 'x_after_body_begin' ); ?>

  <div <?php echo $x_root_atts; ?>>

    <?php do_action( 'x_before_site_begin' ); ?>

    <div <?php echo $x_site_atts; ?>>

    <?php do_action( 'x_after_site_begin' ); ?>

Best Regards.

Hi Ruenel,

Thanks for getting back to me :slight_smile:
I had a previous backup of the same site (which didn’t have the base.php file in it and it still had the error? I’ve fixed it now though thanks.

Glad you sorted things out,

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.