Can I set a default dashboard layout for all users?

Hi @Relequestual: I think what you want is here: Dashboard Widgets API / Advanced: Forcing your widget to the top It doesn’t require you to change code per se, just to add the code like shown in the WordPress Codex to your theme’s functions.php file which is a standard way to customize and/or extend WordPress: … Read more

How to remove the site health dashboard widget?

The following snippet removes the registered site health dashboard widget from the dashboard. Add the code to your plugin or functions.php file: add_action(‘wp_dashboard_setup’, ‘remove_site_health_dashboard_widget’); function remove_site_health_dashboard_widget() { remove_meta_box(‘dashboard_site_health’, ‘dashboard’, ‘normal’); }

Dashboard like meta boxes in my plugin – how to save their position and open/closed state?

When ordering or closing metaboxes, those actions require nonces, add the following to your code and see if that resolves the problem. <?php wp_nonce_field(‘closedpostboxes’, ‘closedpostboxesnonce’, false ); ?> <?php wp_nonce_field(‘meta-box-order’, ‘meta-box-order-nonce’, false ); ?> Additional: You should add metaboxes to your page using add_meta_box and output them using do_meta_boxes passing in the hook for your … Read more

How to display the user that published a pending post?

The reason that get_the_modified_author() is not working is that it relies on being used within the WordPress loop. wp_get_recent_posts() does not set up a global post object. Here is a complete example based on your original code that replaces get_the_modified_author() with some simple code to get the name of the last person who edited the … Read more

How to Make an admin_notices Message That Disappears Once the User Leaves That Particular Page?

The short answer is: Use Query Strings. If you notice in the address bar immediately after you publish a Post… You will see something similar to this: domain.com/wp-admin/post.php?post=4935&action=edit&message=6 There’s a few different Query Variables: post contains the ID of the Post being edited. action is saying we’re currently “editing” the Post. message refers to what … Read more

How to Remove All Widgets from Dashboard?

From this Q&A, I’ve learned about the global variable $wp_meta_boxes. And over there is also the code to remove the default meta boxes. After examining the variable, this is the code I wrote to remove all Dashboard Widgets, including the ones added by plugins: add_action(‘wp_dashboard_setup’, ‘wpse_73561_remove_all_dashboard_meta_boxes’, 9999 ); function wpse_73561_remove_all_dashboard_meta_boxes() { global $wp_meta_boxes; $wp_meta_boxes[‘dashboard’][‘normal’][‘core’] = … Read more

Disable “Blogroll” or “WordPress Dashboard News” section in WordPress v.4.1?

If you want to remove metaboxes from the dashboard page you can add this to functions.php function remove_dashboard_widgets () { remove_meta_box(‘dashboard_quick_press’,’dashboard’,’side’); //Quick Press widget remove_meta_box(‘dashboard_recent_drafts’,’dashboard’,’side’); //Recent Drafts remove_meta_box(‘dashboard_primary’,’dashboard’,’side’); //WordPress.com Blog remove_meta_box(‘dashboard_secondary’,’dashboard’,’side’); //Other WordPress News remove_meta_box(‘dashboard_incoming_links’,’dashboard’,’normal’); //Incoming Links remove_meta_box(‘dashboard_plugins’,’dashboard’,’normal’); //Plugins remove_meta_box(‘dashboard_right_now’,’dashboard’, ‘normal’); //Right Now remove_meta_box(‘rg_forms_dashboard’,’dashboard’,’normal’); //Gravity Forms remove_meta_box(‘dashboard_recent_comments’,’dashboard’,’normal’); //Recent Comments remove_meta_box(‘icl_dashboard_widget’,’dashboard’,’normal’); //Multi Language Plugin remove_meta_box(‘dashboard_activity’,’dashboard’, ‘normal’); … Read more

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