I am developing a plugin. To embed the stylesheet I used wp_enqueue_style(). I want the CSS file to be only implemented at the plugin's page. I have already seen solutions with conditional tags, but neither is_page() nor is_admin() are fitting my request. I am able to implement the stylesheet only in the backend, but it is possible to implement it only on the plugin's page?


Check out this part of the WP Codex: Loading scripts only on plugin pages.

The key is to hook in on the admin_print_styles-{page} action. The {page} part, aka hook suffix, is returned from the add_submenu_page function.

  • Exactly what I was looking for, did oversee it! Thank you :-) – SamiSalami Nov 15 '11 at 13:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.