Why WP_Screeen doesn’t show all options with admin_body_class

But parent_base is set to null. Yes, because by the time admin_body_class is fired, WordPress hasn’t yet set the parent_base value. And it’s only set after the <body> tag is actually outputted. More specifically, it’s set only after the <div id=”wpbody” role=”main”> as you can see here in wp-admin/admin-header.php. Any idea how to add class … Read more

Use current class method inside add_submenu_page()

You’re getting that error because the 5th parameter for add_submenu_page() should be a string which is the menu slug and yet you supplied a callback ([$this,’sports_info_page’]). So be sure to use a valid slug like so and the error will be gone: add_submenu_page( ‘sports_info’, // parent slug ‘Sports Information’, // page title ‘Sports Information’, // … Read more

Automatically Display Sub Menu

If your developing this theme with your own html mark up and css then should be fairly easy… <?php wp_nav_menu( array( ‘theme_location’ => ‘primary’, ‘menu_class’ => ‘topNav’, ‘after’ => ‘<span> </span>’ ) ); ?> You will notice this menu PHP generates a unordered list with your sub menu as a nested unordered list. See your … Read more

How can I add a delay to the collapsible menu in Twenty Eleven?

Superfish is a script that will add a delay to the hover action. It is used in a lot of themes, for instance I know it is used in the Thematic Theme. Untested, but I think this is how you’d apply it (based on the docs). function wp88740_enqueue(){ wp_enqueue_script(‘jquery’); wp_enqueue_script(‘hoverintent’, get_stylesheet_directory() . ‘/scripts/hoverIntent.js’ ); wp_enqueue_script(‘superfish’, … Read more