Archived topic
Remove Generatepress All Css and JS
1 reply · Started by FunkyCss on January 4, 2021
Hi,
I have a single page with GP free no plugins nothing.
Is a one page only with three columns like an app and is using mostly AJAX for the job to be done.
So i want to use GP as a very simple theme instead of adding Underscores.
But i dont need mostly all the css and the js , i dont even use nav.
Any recomendations here to disable the Assets of GP but i dont want to affect any API functions!
Ty in advance!
Hi there,
You can use wp_dequeue_style() and wp_dequeue_script() as needed using our handles. You can check out the handles for the scripts and styles here: https://github.com/tomusborne/generatepress/blob/3.0.2/inc/general.php#L17
For example:
add_action( 'wp_enqueue_scripts', function() {
wp_dequeue_script( 'generate-main' );
} );
Hope this helps!