WordPress Dashboards: slowness and timeouts

Have you taken a look at the error logs? Who is your host? Do you have Process Manager or anything similar to be able to tell what processes are running? A way to tell where most of your bandwidth is being used? Just some ideas on where you might be hitting resource limits. How large … Read more

how do you prevent showing a particular category on the admin dashboard for specific user roles?

Based on the first Answer from Mike Schinkel. For testing purposes in a default installation, the category is “Uncategorized”. add_filter( ‘list_terms_exclusions’, ‘wpse_59652_list_terms_exclusions’, 10, 2 ); function wpse_59652_list_terms_exclusions( $exclusions, $args ) { global $current_screen; if( ‘post’ != $current_screen->post_type ) return $exclusions; if( !current_user_can(‘delete_others_pages’) ) return $exclusions; return $exclusions . ” AND ( t.name <> ‘Uncategorized’ )”; … Read more

Does the 3.4.2 Dashboard have Chrome Frame headers?

From wp-includes/vars.php: if ( isset($_SERVER[‘HTTP_USER_AGENT’]) ) { if ( strpos($_SERVER[‘HTTP_USER_AGENT’], ‘Lynx’) !== false ) { $is_lynx = true; } elseif ( stripos($_SERVER[‘HTTP_USER_AGENT’], ‘chrome’) !== false ) { if ( stripos( $_SERVER[‘HTTP_USER_AGENT’], ‘chromeframe’ ) !== false ) { if ( $is_chrome = apply_filters( ‘use_google_chrome_frame’, is_admin() ) ) header( ‘X-UA-Compatible: chrome=1’ ); $is_winIE = ! $is_chrome; } … Read more

Custom order categories in admin dashboard

Use the get_terms_args hook and modify the orderby argument, like so: add_filter( ‘get_terms_args’, ‘my_sort_terms’, 10, 2 ); function my_sort_terms( $args, $taxonomies ) { $args[‘orderby’] = ‘description’; return $args; } Possible values for this argument are listed in the codex.

How to redirect specific post type with user role

add_action(‘load-index.php’, ‘redirect_dashboard’); function redirect_dashboard() { if ( ! is_admin() || current_user_can(‘activate_plugins’) ) return; $screen = get_current_screen(); if ( is_object($screen) && $screen->base == ‘dashboard’ ) { $url = admin_url(‘edit.php’); wp_safe_redirect( add_query_arg( array(‘post_type’ => ‘product’), $url) ); die(); } }

right_now_content_table_end function not working?

The new action is dashboard_glance_items. It is a filter providing an array to which you can add items. Example from my plugin T5 Taxonomy Location add_filter( ‘dashboard_glance_items’, array ( $this, ‘add_to_glance’ ) ); /** * Add locations to the new “At a glance” dashboard widget. * * @param array $items * @return array */ public … Read more

Hiding Page by Title from Editing

You can hide pages using a filter on pre_get_posts. That can be done setting ‘post__not_in’ argument, but that argument need page ids. And you don’t know the id before the page is created. For that reason, tou can run an additional query to retrieve the ids based on the titles, or better on the slugs … Read more

Hide all Dashboard Widgets (not remove)

First of all I have to say taht after a quick investigations seems that no ‘dashboard_right_now’ or ‘dashboard_quick_press’ usermeta exists… so setting it to false like in you code can’t do anything. That said according to the docs there’s no way to specify where your widget shows up Docs lie. When an user logout and … Read more

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