How to Change the Title of a Meta Box on a Specified Custom Post Type? [duplicate]

Yes – you need a slightly modified version of this answer. add_action( ‘add_meta_boxes_post’, ‘wpse39446_add_meta_boxes’ ); function wpse39446_add_meta_boxes( $post ) { if( ‘mycpt’ == get_post_type($post) ){ remove_meta_box( ‘authordiv’, ‘mycpt’, ‘core’ ); add_meta_box( ‘authordiv’, __(‘Team Member’,’wpse39446_domain’), ‘post_author_meta_box’, ‘mycpt’, ‘advanced’, ‘high’ ); } } Note: If you are doing this for a non-core metabox, you’ll need to ensure … Read more

Remove Widgets in Dashboard

I think the best way to go about this is to create a new plugin (or put in the theme function.php but a plugin will always work independent of theme) that disables the widgets you don’t need. Something like this. function wpse_47707_disable_admin_meta() { remove_meta_box( ‘dashboard_browser_nag’, ‘dashboard’, ‘normal’ ); remove_meta_box( ‘dashboard_right_now’, ‘dashboard’, ‘normal’ ); remove_meta_box( ‘dashboard_recent_comments’, … Read more

Add value to usermeta without removing previous values?

update_user_meta( int $user_id, string $meta_key, mixed $meta_value, mixed $prev_value=”” ) updates existing user meta based on user_id and meta key. If there are many fields with the same key, you can pass `prev_value’ to tell which field you want to update. add_user_meta( int $user_id, string $meta_key, mixed $meta_value, bool $unique = false ) adds meta … Read more

WSOD for admin when using PHP 7

After a lot of testing and considerable frustration, I discovered the problem. I am including this solution in the hope that it saves someone else a lot of frustration if they encounter a similar problem. The problem to be the presence of a PHP closing tag ‘?> ‘ in the functions.php file of the child-theme. … Read more

Different rss feeds in a single dashboard widget

Yes, @toscho is right, the url works with an array of feeds adresses. And if you have 5/6 feeds, the total of items should be 20/24. For clear separation, I think it’s better to run the wp_widget_rss_output function n number of times, and prepare a previous array with titles and addresses and iterate through it. … Read more

Can I limit this meta box to a particular page?

Inside your add_meta_boxex hook callback function, you will have an add_meta_box() call. Wrap that call in a conditional, using data from the $post global (I’m fairly certain it is available in edit.php). For example, you could use either the Page ID or slug. Page ID: global $post; if ( ‘123’ == $post->ID ) { // … Read more