Do you want to disable TablePress resources from your website’s homepage?
By default, the TablePress plugin loads CSS and JS files on all the pages of a WordPress website. This results in loading extra files and exhausting server resources even when there are no TablePress tables used on the home page.
Therefore, to reduce the server load and improve the website’s home page performance, you can remove the TablePress resources from getting loaded on the home page. You can use the below code snippet to disable them on the home page.
php
/**
* Disable TablePress Resources
*/
function maverick_disable_tablepress_resources( $load ) {
if ( is_front_page() ) {
$load = false;
}
return $load;
}
add_filter( 'tablepress_use_default_css', 'maverick_disable_tablepress_resources' );