How can I change the dashboard appearance?

I use a custom include file that I created to modify the dashboard. Some of the hooks and filters are commented out by default but most of the stuff is here to remove menus, change wp logos, remove meta boxes, remove dashboard widgets, etc… <?php /* File: cleanup-dashboard.php Description: Clean up and customize the dashboard … Read more

Custom Table Column Sortable by Taxonomy Query

To achieve adding a custom sortable column to the WP_List_Table of your post type within the WordPress administration back-end dashboard, you will need to do the following: Replace all occurrences of YOUR-POST-TYPE-NAME with your actual post type name. Replace all occurrences of YOUR-TAXONOMY-NAME with your actual taxonomy name. Replace all occurrences of YOUR COLUMN NAME … Read more

Add “external” link to admin menu in the backend

you can create a function that redirects to the front-end like this: function redirect_home_987(){ wp_redirect( home_url() ); exit; } and call that function in WordPress default add_menu_page function like this: add_menu_page( ‘redirecting’, ‘View Site’, ‘read’, ‘my-top-level-handle’, ‘redirect_home_987’); Hope this helps

Extend WordPress 3.8 Site Activity Dashboard Widget to include more comments

Seems like there is no filter for this (yet), but you can unregister the default activity widget and register (within your functions, or even better within your plugin as recommended by Dave Warfel) a similar activity widget with your custom settings: // unregister the default activity widget add_action(‘wp_dashboard_setup’, ‘remove_dashboard_widgets’ ); function remove_dashboard_widgets() { global $wp_meta_boxes; … Read more

alphabetically order role drop-down selection in dashboard

Almost the same approach One Trick Pony has chosen, but I am using translated names and uasort() (to preserve the keys): add_filter( ‘editable_roles’, ‘t5_sort_editable_roles’ ); /** * Array of roles. * * @wp-hook editable_roles * @param array $roles * @return array */ function t5_sort_editable_roles( $roles ) { uasort( $roles, ‘t5_uasort_editable_roles’ ); return $roles; } /** … Read more

Adding Custom Post Type Counts to the Dashboard

Yes, there are several actions within that widget, including right_now_content_table_end. Example: function my_right_now() { $num_widgets = wp_count_posts( ‘widget’ ); $num = number_format_i18n( $num_widgets->publish ); $text = _n( ‘Widget’, ‘Widgets’, $num_widgets->publish ); if ( current_user_can( ‘edit_pages’ ) ) { $num = “<a href=”https://wordpress.stackexchange.com/questions/5318/edit.php?post_type=widget”>$num</a>”; $text = “<a href=”https://wordpress.stackexchange.com/questions/5318/edit.php?post_type=widget”>$text</a>”; } echo ‘<tr>’; echo ‘<td class=”first b b_pages”>’ . … Read more

Hide dashboard from non-admin users

As far as ease of use, especially for WordPress Admins not too firm in PHP, I second brasoflo’s plugin recommendation (Adminimize). For the sake of completeness, this is how it’d be done programmatically: /* Remove the “Dashboard” from the admin menu for non-admin users */ function wpse52752_remove_dashboard () { global $current_user, $menu, $submenu; get_currentuserinfo(); if( … Read more

Remove dashboard, use Pages tab as default

The best way is to re-direct user logins to your page and also remove the dashboard from the menu, this can be done with 2 filters. Redirect logins to your page edit screen example based on user roles, this example uses “author”: function dashboard_redirect($url) { global $current_user; // is there a user ? if(is_array($current_user->roles)) { … Read more

Show Custom Taxonomy Inside Custom Menu

You have some messed up code. I have reformatted your code to code which actually works. The following solution allows you to give your Custom Post Type menu a menu name of what ever you want. Just change the label “menu_name”. POST TYPE // Create the news custom post type register_post_type(‘nwcm_news’, array( ‘labels’ => array( … Read more

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