KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Not sure if I worded it correctly but basically I wanted to load plugin CSS/JS on pages only that uses the actual plugins.. I have gotten a lot of it done by search thru the plugin files for any handles used in wp_enqueue_script within the plugins and simply wp_dequeue_script them in functions.php However, there are some enqueues for style that include a .php and not a css file, for example.. in the plugin it enqueues a file wp_enqueue_style("myrp-stuff", MYRP_PLUGIN_URL . "/myrp-hotlink-css.php"); so I've tried: wp_dequeue_style('myrp-stuff'); wp_deregister_style('myrp-stuff'); It doesn't work However, when the page/post is rendered it shows as <link rel='stylesheet' id='myrp-stuff-css' href='http://www.modernlogic.co/wp/wp-content/plugins/MyRP/myrp-hotlink-css.php?ver=3.4.2' type='text/css' media='all' /> It addes -css to the id and it refuses to dequeue/deregister and be moved. I have also tried the following with no luck wp_dequeue_style('myrp-stuff-css'); wp_deregister_style('myrp-stuff-css'); Any suggestions?
Tags (comma-separated)
Save Edits
Cancel