Utilizing WordPress’ Admin UI for plugin settings: getting accordion style
Here’s how I do it for my plugin/options page (which is inside a class, thus the $this-> construct): /* enqueue our css */ public function enqueue_options_style( $hook ) { if( $hook == $this->admin_page ) wp_enqueue_style( ‘my-options’, ‘/some-directory/my-options.css’, false, $this->version ); // only present for our plugin’s settings page } $this->admin_page is the slug returned from … Read more