Tag Info

Hot answers tagged

23

Another solution is to add the columns setting back to the settings. function wpse126301_dashboard_columns() { add_screen_option( 'layout_columns', array( 'max' => 2, 'default' => 1 ) ); } add_action( 'admin_head-index.php', 'wpse126301_dashboard_columns' ); There is a related Trac ...


10

What you need is in global $wp_meta_boxes indexed by get_current_screen()->id. Removing the screen options will also remove the metaboxes which you can do just before screen options are displayed using the 'in_admin_header' hook. So let's assume you want to get rid of the "Send Trackbacks" screen option which you see in this screenshot: Drop the ...


10

No need to use one or two plugins for such small task... To remove the Help Tab use add_filter( 'contextual_help', 'mytheme_remove_help_tabs', 999, 3 ); function mytheme_remove_help_tabs($old_help, $screen_id, $screen){ $screen->remove_help_tabs(); return $old_help; } Or add_action('admin_head', 'mytheme_remove_help_tabs'); function ...


6

What you need is to modify the $columns variable that is used during list display which you can modify using the 'manage_posts_columns' and 'manage_pages_columns' hooks for post_type='post' and post_type='page', respectively. If you want to ignore custom post types you can inspect the 2nd parameter passed to 'manage_posts_columns' as I did in my example to ...


6

Whenever we find ourselves in the situation "there must be a way to overcome this hard-code", jQuery comes to rescue... The Result The Code The following code must be pasted at the end of the active Theme functions.php file. Or it can be used in a custom plugin, which will make the code "theme-independent". add_action('admin_head-index.php', ...


6

Go to Screen Options at the top, and change the number to something like 200. I don't think it will survive much more than that.


6

This happens because of the new media queries. A very unfortunate change … Anyway, you can change it by setting a custom width for .postbox-container. Use 50% for two columns and 100 % for just one column. add_action( 'admin_head-index.php', function() { ?> <style> .postbox-container { min-width: 100% !important; } ...


5

Go to edit/create a page or post in wp-admin at the top is a "Screen Options" panel link, here you can enable custom fields for that particular page or post. The number of metaboxes displayed by default was reduced in 3.1. If you want to change the default for all users you can hook into the default_hidden_meta_boxes filter.


4

The meta box order gets stored in the user meta and is basically an array of "priority" and meta box id. I didn't check if this meta key gets generated upon user setup or when the first manual reordering occurs. To see how this array looks, and how the native WP metaboxes IDs on a page (post, cpt) are, you can var_dump the following: ...


3

You need to use the filter 'manage_' . $screen->id . '_columns' to add a column and manage_users_custom_column to display its value. add_filter( 'manage_users_columns', 'column_register_wpse_101322' ); add_filter( 'manage_users_custom_column', 'column_display_wpse_101322', 10, 3 ); function column_register_wpse_101322( $columns ) { $columns['uid'] ...


3

You don’t need to invent a new screen option row. Just use proper metaboxes. Currently, you are drawing pseudo-metaboxes: <!-- Post status start--> <div class = "postbox"> <div class = "handlediv"> <br> </div> <h3 class = "hndle"><span><?php _e("By Post Status", 'bulk-delete'); ...


3

I don't know exactly what you are trying to accomplish but you seem to be dealing with meta boxes. If so there are a number of meta box specific hooks. do_action('add_meta_boxes', $post_type, $post); do_action('add_meta_boxes_' . $post_type, $post); do_action('do_meta_boxes', $post_type, 'normal', $post); do_action('do_meta_boxes', $post_type, 'advanced', ...


3

For WordPress 3.5+, adding remove_action( 'welcome_panel', 'wp_welcome_panel' ); to your functions.php removes the Welcome Panel from the Dashboard as well as its Screen Options menu. See http://codex.wordpress.org/Plugin_API/Action_Reference/welcome_panel.


3

There is no way, at least to my knowledge to unset an option from the screen options panel without unsetting the actual metabox itself. My suggestion would be to target these screen options item via your CSS and hide it from view. Add this to your plugin or functions file. Don't forget to update 'METABOXIDNAME' with the ID name of your metabox. ...


3

You can remove (turn-off) the Welcome screen by using any of these two options: Single: add_action( 'load-index.php', 'hide_welcome_screen' ); function hide_welcome_screen() { $user_id = get_current_user_id(); if ( 1 == get_user_meta( $user_id, 'show_welcome_panel', true ) ) update_user_meta( $user_id, 'show_welcome_panel', 0 ); } ...


3

They do work across many computers, as long as you're logged in with the same username. If they don't, try clearing your browser cache.


3

It won't be very hard to do. Just add this to your functions.php or into your plugin: function my_edit_per_page( $result, $option, $user ) { if ( (int)$result < 1 ) return 20; // or whatever you want } add_filter( 'get_user_option_edit_page_per_page', 'my_edit_per_page', 10, 3 ); // for pages add_filter( 'get_user_option_edit_post_per_page', ...


2

Yes, it is too early. Check http://codex.wordpress.org/Function_Reference/get_current_screen for examples of usage.


2

It's a bug: http://core.trac.wordpress.org/ticket/18958


2

Per default some meta boxes are hidden. These boxes are stored in an array which you can find in wp-admin/includes/template.php#get_hidden_meta_boxes(). There is a filter, and therefore a chance for a plugin: <?php # -*- coding: utf-8 -*- /* Plugin Name: Enable Custom Fields per Default Version: 1.0 Required: 3.1 Author: Thomas Scholz Author ...


2

You can hide the Welcome checkbox using some simple CSS: [for="wp_welcome_panel-hide"] { display: none !important; } To add the CSS code to your WP-ADMIN pages, simply add this in your theme's functions.php file before the last ?>: function my_custom_admin_head() { echo '<style>[for="wp_welcome_panel-hide"] {display: none ...


2

This option is stored in the wp_usermeta table with the meta_key name of metaboxhidden_nav-menus. If we hide all the boxes, this is the meta_value of the option: array( "nav-menu-theme-locations", "add-custom-links", "add-post", "add-page", "add-portfolio", "add-category", "add-post_tag", "add-post_format", ...


2

You can remove the panel and the checkbox for it by getting rid of the 'welcome_panel' action. add_action( 'wp_dashboard_setup', 'remove_welcome_panel' ); function remove_welcome_panel() { global $wp_filter; unset( $wp_filter['welcome_panel'] ); }


1

Screen options are server side admin options, not client side. Use different WP accounts to vary the screen options displayed.


1

Based on this Answer by t31os. Here, all meta boxes are being set to invisible, so simply remove from the array the ones that are meant to be visible. add_action('user_register', 'wpse_58645_set_user_metaboxes'); function wpse_58645_set_user_metaboxes( $user_id ) { update_user_meta( $user_id, 'metaboxhidden_post', array( ...


1

Thanks @guiniveretoo, perfect :) Finally this is how I did (this code is used for the menu page screen options): /* Just use to find your screen_id */ add_filter('current_screen', 'the_current_screen' ); function the_current_screen($screen) { if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) return $screen; print_r($screen); return $screen; ...


1

Possibly already answered here : How to set default screen options?


1

There are several plugins that can do that: Adminimize, you can remove it even on role base Admin Trim Menu


1

Apparently, they decided to move it under the un-helpful "help" menu in the main admin bar.


1

This should help you.. <?php function remove_images( $content ) { //Run only on the front page, in your case the homepage if(is_front_page()) { //Remove the images $postOutput = preg_replace('/<img\b[^>]++>/i','', $content); //Get the first 200 characters only, you can change the number if you want ...



Only top voted, non community-wiki answers of a minimum length are eligible