How to make post and comment count unclickable with dashboard_glance_items hook

The dashboard_glance_items filter is only useful for modifying the extra elements. The posts/comments data elements have already been displayed. Here are three ideas: Method #1 – Use the dashboard_glance_items filter: You can use the following filter setup, to remove the posts/pages/comments elements from the output of wp_dashboard_right_now(). The trick is simple, foul WordPress to think … Read more

Custom wp_welcome_panel for every role or custom dashboard

Where is the “Welcome Panel”? The WordPress dashboard (which houses the “Welcome Panel”) basically is the ~/wp-admin/index.php When does it show? As you can see when looking at the source, there’s the following check: if ( has_action( ‘welcome_panel’ ) && current_user_can( ‘edit_theme_options’ ) ) How to bypass the needed capability? Make it available for everyone! … Read more

How do I disable dashboard update notifications for subscribers?

you can include some custom css in your functions.php that hides the update_nag (notifications) element dependent on user capability: add_action(‘admin_head’,’admin_css’); function admin_css() { if(!current_user_can(‘administrator’))//not and admin { echo ‘<style>’; echo ‘.update_nag{display:none}’; echo ‘</style>’; } }

Dashboard says “no posts found” even though there are some posts

Try the fix posted here: http://sourceforge.net/tracker/?func=detail&aid=3485384&group_id=315685&atid=1328061 It worked for me. translations.php line 726 Change this: $pattern = ‘/LIMIT\s*(\d+)((\s*,?\s*)(\d+))(;{0,1})$/is’; to this: $pattern = ‘/LIMIT\s(\d+)((\s*,?\s*)(\d+)*);{0,1}$/is’; Removing the extra parentheses allows “LIMIT 0, 10” to become “TOP 10”. With the extra parentheses, the “0” is used instead.

How to customize the WP admin default help contents

Files to look at: wp-admin/includes/wp-current-screen.php and wp-admin/admin-header.php If we take a look at admin-header.php we can see that $current_screen->render_screen_meta(); is the one responsible for rendering the contextual help on screens. It gets the global $current_screen which is set via WP_Screen class. It has methods like get_help_tabs,get_help_tab,add_help_tab,remove_help_tab,remove_help_tabs , set_help_sidebar which sets and removes the tabs we … Read more

How do I create a new WP admin color scheme?

This code works with WordPress 5.2 and is correct. You now need to go to your Profile and select it by going to Users > Your Profile > Admin Color Scheme select the scheme and save. Edit: Adding updated code for your colors CSS file since you’re using a child theme: function additional_admin_color_schemes() { wp_admin_css_color( … Read more

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