Disable Ajax loading on a page
There are limited cases where the AJAX dynamic loading conflict with 3rd party plugins and affect how the website loads. For example, if your WooCommerce shop has different product variations, AJAX loading can prevent some WooCommerce functions from loading, breaking the shopping experience.
To disable AJAX loading on a certain page, add the code below in Appearance → Customize → Theme Options → General → Custom Javascript (Footer).
if ( Array.isArray( window.djax_ignored_links ) ) {
window.djax_ignored_links.push( 'page-slug' );
} else {
window.djax_ignored_links = [ 'page-slug' ];
}
Replace the page-slug with a part of the URL where you want AJAX removed. For example, if the problem is on the single product page and your URL looks like this https//domain.com/product/tshirt, your code should be be:
if ( Array.isArray( window.djax_ignored_links ) ) {
window.djax_ignored_links.push( 'product' );
} else {
window.djax_ignored_links = [ 'product' ];
}
Disable All AJAX Loading
To fully disable the AJAX loading on all the pages, go to Appearance → Customize → Theme Options → General and uncheck the AJAX Loading option.
To fully disable the AJAX loading on all the pages, use the code below:
if ( Array.isArray( window.djax_ignored_links ) ) {
window.djax_ignored_links.push( 'http' );
} else {
window.djax_ignored_links = [ 'http' ];
}