Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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.

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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