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
Post a Comment