Dashboard links not working

Those links are supposed to show submenus. If they are not showing up, that usually means your theme has a conflict with our plugin (90% of the time, this is boostrap). Please check our documentation about conflicts with Bootstrap as well as our FAQ entry about that.

Options for restricting access to wp-admin

You could make it a mu-plugin (‘Must Use’ plugin). Any PHP file you put into /wp-content/mu-plugins/ will automatically get included in WordPress. You can’t deactivate the plugin (unless you have ftp access to the server). If you go with a mu-plugin, make sure to put the functionality into a subdirectory and bootstrap it with a … Read more

wp-admin slow in multisite

I ended up enabling WP_DEBUG and found an error – something about fsockopen() not being able to connect to my host (I didn’t write it down and now can’t reproduce it) – and found that it was a DNS issue;- my subdomain (foo.example.com) was resolving to the correct IP (10.0.0.1) but the primary domain wasn’t. … Read more

Remove date and category filters when editing custom post types

To remove the dates: function my_remove_date_filter( $months ) { global $typenow; // use this to restrict it to a particular post type if ( $typenow == ‘post’ ) { return array(); // return an empty array } return $months; // otherwise return the original for other post types } add_filter(‘months_dropdown_results’, ‘my_remove_date_filter’); To remove categories: function … Read more

Add column to pages table

Also an tutorial with an solution for page and post to add thumbnail in a column: http://wpengineer.com/1960/display-post-thumbnail-post-page-overview/ Change the content from thumbnail to your content and remove the hooks for post: // for posts // add_filter( ‘manage_posts_columns’, ‘fb_AddThumbColumn’ ); // add_action( ‘manage_posts_custom_column’, ‘fb_AddThumbValue’, 10, 2 ); // for pages add_filter( ‘manage_pages_columns’, ‘fb_AddThumbColumn’ ); add_action( ‘manage_pages_custom_column’, … Read more

Create a clickable name in WP_List_Table for Plugin Admin

The WP_List_Table class ultimately uses the single_row_columns method to output each table cell. If we look at that method, we’ll see this part: … elseif ( method_exists( $this, ‘column_’ . $column_name ) ) { echo “<td $attributes>”; echo call_user_func( array( &$this, ‘column_’ . $column_name ), $item ); echo “</td>”; } … Add a method to … Read more

How to disable or hide “collapse menu”

Here is a simple css display: none function, it just adds some css in the html, if there are more stuff that you want to hide i recommend you to add a new css-file with the function admin_enqueue_scripts function wpse_remove_collapse() { echo ‘<style type=”text/css”>#collapse-menu { display: none; visibility: hidden; }</style>’; } add_action(‘admin_head’, ‘wpse_remove_collapse’);