Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author GusRuss89

    (@gusruss89)

    Hi @juri003

    You can do it like this. This code can go in your functions.php or wherever you put code for actions and filters.

    add_action( 'wp_enqueue_scripts', 'my_dequeue_cf7md', 99 );
    function my_dequeue_cf7md() {
      // Writing this conditional is up to you
      if( !is_page( 'contact' ) ) {
        wp_dequeue_script( 'md-components-js' );
        wp_dequeue_script( 'autosize' );
        wp_dequeue_script( 'cf7-material-design' );
        wp_dequeue_style( 'cf7md_roboto' );
        wp_dequeue_style( 'cf7-material-design' );
      }
    }

    Thanks,
    Angus

    Thread Starter juri003

    (@juri003)

    Works like a charm!

    Thanks Angus

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Load assets on specific pages’ is closed to new replies.