Add style to wordpress plugin
-
Hi all.
I have such a problem.
I have a wordpress project where I have a few plugins that add menus to admin panel.
Now I want to add styles to that plugins.in my plugin’s index.php file I write
function my_admin_theme_style() { wp_enqueue_style('my-admin-theme', plugins_url('style.css', __FILE__)); } add_action('admin_enqueue_style', 'my_admin_theme_style');
But this adds style.css’s style on every admin-page, but I need to add only on that one menu page that this plugin creates.
How to do it?
Thanks.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Add style to wordpress plugin’ is closed to new replies.