Show admin menu and toolbar in admin post page

What you see on that image is the full-screen mode which is the default mode in the block editor (that applies to Pages, Posts and custom post types), and which is intended to help users to work without distraction. Secondly, there’s also a note in wp-admin/admin-header.php which says that // Default to is-fullscreen-mode to avoid … Read more

Print Dashboard menu name and link

Not sure what you are trying to accomplish precisely, since you don’t cover that part. Looking at the data I would guess you can filter out separators and such by checking for proper title: global $menu; foreach ( $menu as $group => $item ) { if ( ! empty( $item[0] ) ) { echo $item[0] … Read more

Admin Menu – Highlight top-level menu when on a sub-menu page (without showing sub-menu)

That’s a bit of a late answer and I don’t know if @Jay ever sorted it out, but to anyone having the same issue, here’s how I fixed it. Menu Pages function my_admin_menu() { add_menu_page( ‘Page title’, ‘Menu title’, ‘manage_options’, ‘my_page’, null, null, 99 ); add_submenu_page( ‘my_page’, ‘Subpage 1 title’, ‘Subpage 1 menu title’, ‘manage_options’, … Read more

WordPress setting API strucked

You are Missing few Things. First of all hook the function wpt_theme_init with admin_init or similar one. otherwise your function will not execute. example below add_action( ‘admin_init’, ‘wpt_theme_init’ ); add_settings_section and add_settings_field take 4th argument as a $page parameter. which is wptsettings in your case. remember? you have named your page wptsettings in add_theme_page ( … Read more

Menu Error in Admin Console with Custom Plugin: You do not have sufficient permissions to access this page

I think the issue may be in your call to add_submenu_page(): add_submenu_page(‘wpsc-sales-logs’,… The first parameter needs to be a reference to your Menu Page’s “slug”, i.e. if you use ‘edit.php’ instead you’ll see that you get a menu option under the “Posts” menu page: add_submenu_page(‘edit.php’,’WPEC – Group Pricing’,’Group Pricing’, 7, ‘wp-e-commerce-group-pricing’, ‘price_options’); Here’s what it … Read more

Admin page menu keeps bugging out

It’s an issue with Chrome. It was reported on the Google Chrome product forum today now that it has hit the stable release. I originally saw this issue on this thread: WordPress admin menu formatting issue I wrote a quick plugin as a workaround until they fix it: https://github.com/raffjones/chrome-admin-menu-fix.

Remove Menu Page Giving Error

Put the add_action line inside the if (!current_user_can(‘activate_plugins’) ) {: <?php /************ Remove admin menu items from anyone who isn’t an admin ************/ if (!current_user_can(‘activate_plugins’) ) { function my_remove_menu_pages() { remove_menu_page(‘link-manager.php’); remove_menu_page(‘tools.php’); remove_menu_page(‘edit-comments.php’); } add_action( ‘admin_menu’, ‘my_remove_menu_pages’ ); }; ?>

Reference external file as a function

You can’t. Create a function that loads that file: function load_admin_page_file() { require ‘admin-members.php’; } Then use that function name as callback argument. In PHP 5.3 you can use a lambda: add_menu_page( ‘Members’, ‘Members’, ‘manage_options’, ‘members’, function() { require ‘admin-members.php’; } );

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)