[SOLVED] Site opens fine in logged-in Chrome tab, but only loads header and footer in incognito

[ad_1]

I’m having the same issue that I reported over here: [https://www.facebook.com/groups/916625091796611/?multi\_permalinks=6223234774468923])

Except this time it is happening on my local **WampServer** install. Here’s what I’ve done already to fix, with no success:

* DELETE PAGE: home
* RENAME PAGE: home-branch-2 -> home
* REFRESH ELEMENTOR CSS
* REFRESH PERMALINKS
* CLEAR BROWSER CACHE
* CLEAR BROWSER HISTORY
* OPTIMIZED DATABASE with WP-Optimize
* DISABLED CACHING: Commented out mod\_epires Apache directives in .htaccess
* NO OTHER caching plugins are installed.

I ran this **”Purge your Site”** code snippet from **Imran Siddiq** (WebSquadron) also: [https://websquadron.co.uk/page-speed-performance-wordpress-code-snippets/])

/*
Plugin Name: Purge Cache
Description: Adds a button to the WordPress dashboard to clear the object cache
*/

add_action( ‘admin_bar_menu’, ‘add_purge_cache_button’, 999 );

function add_purge_cache_button( $wp_admin_bar ) {
if ( ! current_user_can( ‘manage_options’ ) ) {
return;
}

$args = array(
‘id’ => ‘purge-cache’,
‘title’ => ‘Purge Cache’,
‘href’ => ‘#’,
‘meta’ => array( ‘class’ => ‘purge-cache’ )
);
$wp_admin_bar->add_node( $args );
}

add_action( ‘admin_footer’, ‘add_purge_cache_script’ );

function add_purge_cache_script() {
if ( ! current_user_can( ‘manage_options’ ) ) {
return;
}
?>
<script>
jQuery(document).ready(function($) {
$(‘#wp-admin-bar-purge-cache’).click(function() {
if (confirm(‘Are you sure you want to purge the cache?’)) {
$.ajax({
url: ‘<?php echo admin_url( ‘admin-ajax.php’ ); ?>’,
data: {
action: ‘purge_cache’,
},
success: function() {
alert(‘Cache purged successfully!’);
},
error: function() {
alert(‘An error occurred while purging the cache.’);
}
});
}
});
});
</script>
<?php
}

add_action( ‘wp_ajax_purge_cache’, ‘purge_cache_callback’ );

function purge_cache_callback() {
global $wp_object_cache;
if ( ! current_user_can( ‘manage_options’ ) ) {
wp_die();
}

wp_cache_flush();

wp_die();
}

1. Is there some of there some other cache I’m missing?
2. Is there a better “best practice” for renaming one file to

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer