This should help:
function so_screen_layout_columns( $columns ) {
$columns['dashboard'] = 2;
return $columns;
}
add_filter( 'screen_layout_columns', 'so_screen_layout_columns' );
function so_screen_layout_dashboard() {
return 2;
}
add_filter( 'get_user_option_screen_layout_dashboard', 'so_screen_layout_dashboard' );
On dashboard screen options it will show 1 or 2 columns, after clicking 1 column after refresh will still be 2 columns. You can change to whatever number you want
Related Posts:
- How can I ‘reactivate’ .PHP files within a WP plugin that have been marked ‘inactive’?
- How Restrict access to admin dashboard by specific static ip?
- Dashboard Widget Form
- Why isn’t admin_notices displaying my text? [Simple Plugin, Beginner]
- WordPress takes too much time (100 seconds) to load – Front end and back end
- WordPress on AWS with ELB
- How to make multiple admin pages for one plugin?
- Can’t save changes or modify settings in Dashboard but Pages and Posts are fine
- WordPress fatal error from php protocol codes
- How can we get this dynamically as this folder may not be by the same name always → wp-admin
- Calling PHP function with AJAX
- WordPress Dashboard add user password not working, etc
- Why is my form going to frontend on html form submission present on the php files inside my custom plugin?
- WordPress Plugin PHP Not Calling Function
- Is admin section completely customizable in terms of styling?
- Not able to upload Plugins/ Theme from Admin backend
- Admin login substantially slower on production server
- How to add php stylesheet to admin section instead of admin_head hook
- Allow direct access to files/folders within WordPress to replace wp-admin
- WordPress Plugin and other pages not opening
- PHP FATAL ERROR
- When unit testing a plugin, does the plugin need to be in the wp-content/plugins directory of the WordPress tests install?
- How can I prevent a plugin from updating unless it’s minimum PHP version is met?
- Extension preview disapeared since WP 4.5.2
- Determining where fopen() is writing files when used from WordPress AJAX call [closed]
- How to get images from EDD post?
- Add multiple attributes to product from php
- How to install and activate a plugin via an external PHP script
- Making menu link open in new tab?
- How to remove xmlns on language_attributes()?
- How to initialize something in unit test before the init hook being called?
- Add category to body class
- Plugin Development sqlite or WordPress’ database
- How to review WordPress website php version compatibility?
- How to make an interface similar to multi-site for switching between multiple (single) sites for administrators?
- Add keywords meta to index.php page
- Download any file after submitting a form [closed]
- Pulling data from custom plugin settings using PHP shortcode and Javascript
- woocommerce 3.2.1 not sending order notification emails
- Redirecting a buddyboss profile tab to a different tab if not subscribed to a specific membership
- Add a CSS class based on categroy id to archive pages
- Access WordPress data from external PHP application.
- Problem with PHP wordpress, Undefined index: in C:\xampp\htdocs\wordpress\wp-content\plugins\epoch\classes\core.php on line 190 [closed]
- How to create a custom post type that contains another custom post type?
- WP Query. Is there a maximum size?
- WP Plugins – Use includes to display page content
- Sync User to cPanel webmail?
- Redeclare function after plugin activation
- get_edit_post_link() not working on wp-cron
- Woocommerce Backend Search by Title and SKU
- Control page content visibility based on URL parameter
- WooCommerce Shopping Cart Not Initially Showing Products [closed]
- How to translate wordpress error message
- Override a Plugin Function
- Comment “like” problem – “users who like this” avatar linking to current user profile instead of “liker’s” profile
- I want to generate the pdf and save it in library?
- Add key and value to an array in another file
- Trying to make a simple wordpress plugin, having difficulties understanding how to make it?
- Creating a search form and displaying results
- wordpress plugin license issue -New plugin development
- Create “new pages” within the admin section of plugin
- More gentle way to hook WordPress custom url
- add_action for publish_post doesn’t work
- How to proper escape echo inside a javascript tag
- How to Call Specific .PHP file on add_submenu_page selection in Plugin Development?
- How to convert Currency from USD to other IP Based currency in Php function
- How do I reinit WordPress plugins dynamically using jS?
- Elementor pro page editing gives error There has been a critical error on this website. Please check your site admin email inbox for instructions
- WordPress + python integration
- Newbie problem with adding include wp_footer
- Need help with Task assigning and rewarding as currency which withdrawable
- Hide content for specific users with id
- adding dynamic/multiple slug values in ‘option_none_value’
- Can’t access 3rd party API, code works on local server but not on wordpress
- Get post content inside plugin class method
- Python in WordPress – A “Hello World” implementation
- Compare Ajax Data Results
- wordpress plugin translation not working
- Restrict role to use a plugin
- Creating new option (add_option) from AJAX – Settings API
- Use WP_Query for custom post type but result get empty
- Same Title on two different post type with single custom taxonomy
- Every time I use wp_get_current_user() my plugin breaks
- Need help integrating plugin into theme
- resizes images on the fly
- The Commercial tab is missing from the Plugins page when trying to update Types 1.7
- get_option return incorrect values
- Saving plugin data returns “You do not have sufficient permissions to access this page.”
- private functions in plugins
- Load my plugin before cache
- wp_insert_post() get Fatal Error from Plugin
- How do I add custom fields to the “Edit page” admin screen?
- Adminimize Plugin — Is there an alternative to limiting Editor to ‘Appearance > Widgets’ only?
- Is there a visual editor specifically for page snippets/sections?
- TML Theme My Login Plugin
- Limit entry to a WordPress page
- The Admin page isn’t showing in the sidebar of the dashboard
- WordPress search every time shows no search found even data exists
- Plugin Error – Not Sure Where to Go From Here
- Woocommerce attatch files and custom input meta to cart items and then to order