Don’t confuse menu structure with page/URL structure. Each one of your pages may have a different hook.
Do this:
function my_enqueue($hook) {
echo $hook;
}
add_action( 'admin_enqueue_scripts', 'my_enqueue' );
Load your pages and write down the hook names.
There may be other ways to do this too, like the admin-print-scripts-$hook_suffix
hooks. Look in wp-admin/admin-header.php
to see what I mean, about line 68.
Related Posts:
- Any official way to create an admin theme?
- How do I create my own admin button and theme settings page?
- Multisite: setting theme and options when a new blog is created
- Theme Development Admin Area [closed]
- Passing dynamic options from backend to frontend
- Problems to disable the comments for my statics pages
- Is there any way to modify images from a theme using the web interface?
- Theme Options Menu Item – Permission Issue
- Opinions and recommendations on the best barebones base theme [closed]
- Customizing a WordPress theme without changing it?
- How to Link External jQuery/Javascript files with WordPress
- Best practices for a Style/CSS based theme options page?
- Custom Taxonomy-specific JavaScript
- Splitting an Evolving Site into Multiple Sites, or Maintaining as One Site?
- Moving WordPress.com theme and widget settings to self-hosted site?
- Building useful features into your theme
- Editing theme files and access to the Code pages only to super-admin?
- Copying theme from Localhost to Live does not copy all theme settings with it?
- Change Default Image HTML
- How to delete default themes
- Extra User Profile Field Upload File / Image
- Register theme customizer settings when theme activates [duplicate]
- Edit raw HTML of the landing page
- Problem : deletion failed, the theme requested does not exist
- Theme Activation, Create Database Tables
- Exclude stylesheet from admin
- Will activating a different theme preserve custom settings to current theme?
- Can I apply a WP theme to a specific custom page template?
- How get Themes list via REST api?
- Activate a new WordPress Theme Only for Admins
- How to mark an option as selected
- Add transparency to wordpress color picker?
- How can I show more than 15 themes at a time in the admin menu?
- How to trigger function on theme delete?
- Setting a static home page and blog page without using the settings
- Two Navigation Menus – secondary nav is including main nav
- Possible to put header-{your_custom_template}.php in subdirectory?
- Renaming the Twenty Fourteen WordPress theme
- Working with an Array inside Your Theme Options Array – Multiple Values
- How do you get thumbnails to show up in the admin edit post?
- Protect changes made to the theme when updating
- How to set a single theme directory on a multisite blog?
- Add a series of checkboxes to theme options
- What’s the order of loading wordpress elements?
- How can I display/hide certain content based on a Theme Option field?
- Static page not working
- Warning: Creating default object… when altering Customize panels
- Posts and Pages not showing on admin, but showing in theme
- loss of theme options while site deployment in production
- Theme settings default, strange behavior before first save
- How to find out if page_for_posts is showing (in order to style menu item)
- New custom theme option (text input) giving index error
- Custom options below pages/posts editor?
- WordPress slugs and 404 handling takes preference over folders in site root?
- What changes we need to make to a theme so it can be installed as a MU Theme?
- Problem of running development copy of WordPress on WebMatrix?
- Full page (no WP admin menus and options) admin theme options
- Different logo on homepage
- How to display message (with switch_theme hook) after deactivating My theme?
- How can we hide the parent’s theme url at the child themes details on a multisite?
- the_content() is not displaying content, why? [closed]
- What is the correct way to integrate wordpress with another php application?
- Customizing page content layout
- Redirect to another page using contact form 7? [closed]
- Tips for managing code when developing a parent theme framework
- How to switch theme if the current user is admin?
- How to dynamically change theme’s slogan from admin?
- Trying to uninstall a theme, but it’s hijacking my home page
- How to reset a custom theme
- Most wp_nav_menu parameters ignored
- Using the same database on another Subdomain
- Theme javascript/css 404
- How To Show Different Footers For Different Post Types Pages?
- WordPress setup one database with two different website?
- How to remove permalinks links presents in each page of my site?
- Get data from Theme Options and use them into meta options field in custom post type
- I made new theme directory, why won’t it show up in admin GUI?
- Custom fields not displaying on front end
- My blog suddenly can’t find my stylesheet?
- What’s the easiest way of adding more options in the Theme Options of the twenty eleven theme?
- Customizing 1 theme for multiple blogs in a multisite setup
- What is the most efficient way of adding additional functionaliy for admin only
- remove screenshot.png via dashboard
- How to implement theme option to change bootstrap 4 container from .container to .container-fluid
- Echo custom admin field into a is_single()
- Default and warning messages & no login
- dynamic image path within a javascript file
- Display ads by location [closed]
- WordPress Dashboard Problem [closed]
- Theme Dev | Convert Template to Theme
- Can i add wordpress editor to my custom theme option? [closed]
- Work on theme files on a server & browser preview before installing it
- Create a child Theme or custom Theme
- Static front page displaying twice
- Static posts page is not working
- register_theme_directory and broken deploys
- Hide upload image fields for the different media upload popups
- A wordpress site keeps editing wp-content files after migration
- Remove style id inline CSS in WordPress
- Orion theme (from theme forest) [closed]