Admin bar is disabled in front

First check admin bar is showing in WP admin. So go to : Users -> YOUR_PROFILE One of the check boxes : “Show Toolbar when viewing site” — make sure that’s checked on . Then if it’s ok add this code to your functions.php : function admin_bar(){ if(is_user_logged_in()){ add_filter( ‘show_admin_bar’, ‘__return_true’ , 1000 ); } … Read more

Redirect admin 403 “Cheatin uh?” admin pages

Sounds like this is what you’re running into. admin_page_access_denied may be the hook you want to use for this. try function dont_show_cheatin_page() { if ( current_user_can( ‘do_not_allow’ ) ) { wp_safe_redirect( admin_url()); // custom redirect instead of Cheatin 403 page exit; } } add_action(‘admin_page_access_denied’, ‘dont_show_cheatin_page’);

Private post hidden from Admin too

By default, WordPress posts set to private are visible to admins, and you can distinguish them on the frontend because they have ‘Private:’ prepended to their title. However, you might have plugins installed that are modifying this behaviour. It could be your capability management plugin, or it could be WooCommerce. The specifics of third-party plugins … Read more

Removing custom sort order from admin page listing

By default pages are order by menu_order then title. When you are adding filter country you are ordering them by meta_value There are two options Remove everything that you added country and orderby pages will be back to default order. If you can not remove orderby but can remove country then adjust your code in … Read more

Disable Auto-Expanding Menu in WordPress Admin Menus

I see two options here – override the CSS, or remove the “active” classes with JavaScript (sadly there is no action/filter that we can do this server-side) – I opted for the JS approach, it’s cleaner, leaner and meaner: function wpse_227037_remove_menu_classes() { echo ‘<script>jQuery( “.wp-has-current-submenu.wp-menu-open” ).removeClass( “wp-has-current-submenu wp-menu-open” ).addClass( “wp-not-current-submenu” );</script>’; } add_action( ‘adminmenu’, ‘wpse_227037_remove_menu_classes’ … Read more

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