Add custom column to Users admin panel

Ok, Here is the code to allow your users to add phone numbers. Paste this full code in functions.php file. This will add new field on user profile for “Phone Number” and add a column user table on WordPress admin for phone. function new_contact_methods( $contactmethods ) { $contactmethods[‘phone’] = ‘Phone Number’; return $contactmethods; } add_filter( … Read more

How to remove admin menu pages inserted by plugins?

You need to use the right hooks (which are not always the same as the URLs/slugs), and it doesn’t hurt to use a hook that runs later (e.g., admin_init): add_action( ‘admin_init’, ‘wpse_136058_remove_menu_pages’ ); function wpse_136058_remove_menu_pages() { remove_menu_page( ‘edit.php?post_type=acf’ ); remove_menu_page( ‘wpcf7’ ); } You can use the following to debug: add_action( ‘admin_init’, ‘wpse_136058_debug_admin_menu’ ); function … Read more

Creating a table in the admin-style?

This is what I generally use: <table class=”widefat fixed” cellspacing=”0″> <thead> <tr> <th id=”cb” class=”manage-column column-cb check-column” scope=”col”></th> // this column contains checkboxes <th id=”columnname” class=”manage-column column-columnname” scope=”col”></th> <th id=”columnname” class=”manage-column column-columnname num” scope=”col”></th> // “num” added because the column contains numbers </tr> </thead> <tfoot> <tr> <th class=”manage-column column-cb check-column” scope=”col”></th> <th class=”manage-column column-columnname” scope=”col”></th> … Read more

What are the standard admin CSS id/class tags?

We’re working on updating http://dotorgstyleguide.wordpress.com/ to have more of this information and reflect the style updates from 3.2. Other than that, I’ve seen a plugin (that I currently cannot locate) that shows a demo page of sorts that displays the various CSS selectors and what they look like, but I believe it was outdated. Other … Read more