How to display a user’s bio (not the author or logged in user)

You can make use of wp_get_current_user() or get_currentuserinfo() (to which wp_get_current_user() is a wrapper function to) or get_current_user_id() which uses wp_get_current_user() to get the current logged in user ID. One way or the other, you need to make sure that you have a logged in user (user ID is not 0) before trying to get … Read more

Admin Filter – Add Post Type Description on Post Type Page

The filter views_{$this->screen->id} is fired just after the title of post edit screen has been print to screen, so it’s a safe place to just echo what you want. So you can simply do: function post_type_desc( $views ){ $screen = get_current_screen(); $post_type = get_post_type_object($screen->post_type); if ($post_type->description) { printf(‘<h4>%s</h4>’, esc_html($post_type->description)); // echo } return $views; // … Read more

Remove the category/taxonomy description field?

When no hook is available, you can always count on the old jQuery trickery… add_action( ‘admin_footer-edit-tags.php’, ‘wpse_56569_remove_cat_tag_description’ ); function wpse_56569_remove_cat_tag_description(){ global $current_screen; switch ( $current_screen->id ) { case ‘edit-category’: // WE ARE AT /wp-admin/edit-tags.php?taxonomy=category // OR AT /wp-admin/edit-tags.php?action=edit&taxonomy=category&tag_ID=1&post_type=post break; case ‘edit-post_tag’: // WE ARE AT /wp-admin/edit-tags.php?taxonomy=post_tag // OR AT /wp-admin/edit-tags.php?action=edit&taxonomy=post_tag&tag_ID=3&post_type=post break; } ?> <script type=”text/javascript”> … Read more