[Support request] Remove Generatepress All Css and JS

Home Forums Support [Support request] Remove Generatepress All Css and JS

Home Forums Support Remove Generatepress All Css and JS

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1604696
    FunkyCss

    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!

    #1605411
    Tom
    Lead Developer
    Lead Developer

    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!

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.