admin_head-(plugin_page) with custom post type
-
Hello!
I’m trying to insert some content in <head> on a custom post type admin page (named short-facts).
It works using the admin_head hook. But I want to target the specific page using admin_head-(plugin_page). Like this:
function some_css(){ echo '<style type="text/css">...</style>'; } add_action('admin_head-short-facts', 'some_css');
Can’t get it to work though. The example on https://codex.www.ads-software.com/Plugin_API/Action_Reference/admin_head-%28plugin_page%29 is using the add_options_page function for doing this. Here I’m just having a regular register_post_type which means that I don’t have to add any pages “manually”.
Is it possible to solve? Should I do this with some kind of filter instead?
Thanks!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘admin_head-(plugin_page) with custom post type’ is closed to new replies.