php - How to remove style.css on specific wordpress page -


i have wordpress child theme in place wp_head(); style.css added like:

<link rel='stylesheet' id='parent-style-css'  href='http://something' type='text/css' media='all' /> 

id remove style on specific page (lets page has id=5). i've found how in jquery seems bad idea remove styles client-side.

how can remove style via php? possibly using https://codex.wordpress.org/function_reference/wp_dequeue_style on 1 specific page.

put code in wp theme functions.php file. should de-queue style files specific pages:

 add_action('init','_remove_style');   function _remove_style(){     global $post;     $pageid = array('20','30', '420');//mention page id not wish include script      if(in_array($post->id, $pageid)) {       wp_dequeue_style('style.css');      }  } 

Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -