How can I add a column in the wp_list_table of the admin area?

I think what you need is the set of filters and actions to add custom columns to post edit screens: manage_edit-post_type_columns: used to add columns manage_posts_custom_column: used to print the content of each row of the column manage_edit-post_type_sortable_columns: used to register sortable columns. Undocumented. request: you may need to use this filter in combination with … Read more

Is it possible to modify the media library admin screen?

That area of all admin screens is where admin notices are displayed, so you could generate an admin notice. Here’s a suitable function and hook: function wpse_233031_admin_notice() { ?> <div class=”notice notice-info”> <p>Your message here!</p> </div> <?php } function wpse_233031_hook_admin_notice() { add_action( ‘admin_notices’, ‘wpse_233031_admin_notice’ ); } add_action( ‘load-upload.php’, ‘wpse_233031_hook_admin_notice’ ); /* Edited out anonymous function … Read more

Admin Notices coding standard issue

One way you can handle this would be to do the wp_sprintf when assigning the value of the $message variable and then use wp_kses when you want to output. You could also output the div and paragraph tags before and after the message, which would eliminate the need for wp_sprintf in this instance. add_action( ‘admin_notices’, … Read more

Filtering admin entries for custom post type

You can use the pre_get_posts hook – the following code assumes your input name is event_date, and the values are in the format YYYY-MM. It runs a few checks (is the input non-empty, are we in the admin, is this the main query, and is this for events?) before generating a meta query, which is … Read more

Admin List Dynamic Heading

When you take a look at wp-admin/edit.php, you’ll see that this string is printed with this line: echo esc_html( $post_type_object->labels->name ); So there is no filter to modify it in edit.php. There are no filters in get_post_type_object also, so we can’t change it in there too, but… The object for given post type is stored … Read more

Getting Rid of the WordPress.com Toolbar on Other Sites?

Add the following code to your user stylesheet: #wpcombar { height: 2px !important; overflow: hidden !important; } #wpcombar:hover, #wpcombar:focus { height: 28px !important; } This will shrink down the toolbar to a 2px line. You may use display:none to remove it completely, but then it will not be accessible when you need it.