0

I want disable one specific page of the default css, and i want use my css on the specific page. I don't know it is posibble?

I use Blank State plugin, for create blank page, but css its on the blank pages, but i want my css use on the specific blank pages.

https://wordpress.org/plugins/blank-slate/

So, i have one page, that name: test-area-7 Code:

add_action('wp_enqueue_scripts', 'my_script', 99);
function my_script()
{
    if(is_page( 'test-area-7' )){
        wp_dequeue_script('fpw_styles_css');
    }
}

EDITED

    add_action('wp_enqueue_scripts', 'my_script', 99);
function my_script()
{
    if(is_page( 'test-area-7' )){
        wp_dequeue_script('/wp-content/themes/colormag/style.css');
    }
}
0

Disable CSS specific page for use conditional tag.

add_action('wp_enqueue_scripts', 'my_script', 99);
function my_script()
{
    if(is_page( 'Page name' )){
        wp_dequeue_script('fpw_styles_css');
    }
}

EDIT

 wp_dequeue_script('Your css name or id');

EDIT

Please check this link for more :

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

How to use wp_dequeue_style() for style enqueued in WP_Widget class

 wp_enqueue_style( 'my-theme-ie', get_stylesheet_directory_uri() . "/css/ie.css");
wp_dequeue_script('my-theme-ie');
  • Huh, it is not working. Probably I'm doing something wrong. – Ever Thems Jul 7 '17 at 12:19
  • put your code here. update your Question – Jignesh Patel Jul 7 '17 at 12:20
  • Added the code, of question. – Ever Thems Jul 7 '17 at 12:26
  • edit my answer please check it – Jignesh Patel Jul 7 '17 at 12:28
  • So on the "Your css name or id" place the path my css? – Ever Thems Jul 7 '17 at 12:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.