Support » Plugin: Grid » How can I remove the default CSS?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The default CSS is registered with an wp_ajax_ action. To remove it, we must first wait until we are sure the action has taken place – e.g. by using the wp_loaded hook. Then, we can remove the action we don’t like. I do it like this:

    
    add_action('wp_loaded', function () {
        remove_all_actions('wp_ajax_gridfrontendCSS');
        remove_all_actions('wp_ajax_nopriv_gridfrontendCSS');
    });
    
    • This reply was modified 2 years, 3 months ago by  philippze.
    Plugin Author EdwardBock

    (@edwardbock)

    Hi,

    you can simply add an empty /grid/default-frontend.css in your theme or the cleaner way is to use wp_dequeue_style(‘grid_frontend’)

    https://developer.wordpress.org/reference/functions/wp_dequeue_style/

    Hi Edward,

    I’ve checked it again, but wp_dequeue_style will not work.

    The reason is that the CSS files are not included with wp_enqueue_style, but with wp_ajax_... actions. This happens here.

    wp_ajax works differently, see the docs.

    • This reply was modified 2 years, 3 months ago by  philippze.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How can I remove the default CSS?’ is closed to new replies.