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
- redirect logged users to custom front-end insetad of wp-admin
- I don’t understand how this parameter works..?
- Why wp_mail() function isn’t sending any emails and displaying ‘0’ in Chrome ‘Network’ response
- How to initialize something in unit test before the init hook being called?
- Function to prevent users from trashing comments
- How to Sort the Favorite Plugins Screen Alphabetically?
- Hide extra menus from WordPress Dashboard
- Missing argument 3 for wp_register_sidebar_widget()
- Make id column as AUTO INCREMENT on plugin activation
- How to Include a Loop Template File in a Plugin
- Write to / remove from default .htaccess file from plugin?
- How to provide a plugin which requires CMB2 (plugin dependencies)?
- ‘wp_login’ action hook not working with wp-login.php file
- Update Option Error: Notice: Undefined index
- How can I display a contact form for out of stock products in WooCommerce?
- Pass a php string to a javascript variable
- get shortcode value
- How to get number of Affected rows from wordpress dbDelta() function
- Show price with Geo IP location
- WordPress Ajax Callback
- Add category to body class
- The called constructor method for WP_Widget in GFWidget is deprecated since version 4.3.0! Use
- Plugin Development sqlite or WordPress’ database
- How to review WordPress website php version compatibility?
- printf – problem to understand code
- Custom Post Type Plugin not loading category template and loading 404 instead
- Sending email from inside a plugin using PHP PEAR
- Auto delete WordPress users according to time
- How to cancel WordPress’ action/filter when using OOP with anonymous callback
- WordPress Plugin Page is Loading in Admin Content Container Instead of Separate Page
- How to trigger $_GET request within admin plugin page?
- Wp favorite posts get user favorites in profile using buddypress [closed]
- 404 Error on Activate / Deactivate Plugin
- Storing Options in a Shortcode
- Determine Registered Admin Menus
- How to generate video out of images via WordPress plugin
- How to make an interface similar to multi-site for switching between multiple (single) sites for administrators?
- How can I get WordPress to save comments in markdown format?
- add_query_arg not working
- problems with wordpress and php version 5.3.3-1
- WooCommerce get_price returning wrong price when used via ajax
- How to ‘clone’ a wp plugin to make small changes
- Open Post Thumbnail in New Child Theme File in WordPress
- add mediaelement.js plugins into WordPress video player control bar
- Shortcode button dosent work for all posts. Work for first post only
- Where should I save an API key of my user when installing my plugin?
- Prevent a plugin from being automatically activated
- Plugin upload to install
- Is Wrapping intval() Around esc_attr() Redundant for Escaping Input?
- Programatically download a plugin
- Accessing post’s meta data based on user’s click of a post
- Error shown for Trying to get property ‘roles’ of non-object in WordPress After Content for User Roles
- Preferred way of cacheing a value in php
- Redirecting to home page after login as custom role WordPress
- WordPress Redirect Not Working – AJAX Callback Response Not Picked Up
- How to Use Parameters with a Do_Action Function Within PHP Tags
- Add keywords meta to index.php page
- Custom form action to handle data inside a plugin
- How to remove html code in excel downloads using phpspreadsheet with wordpress plugins shortcode
- Add Product Subtitle to Woocommerce Product Page
- Self deactivate plugins after an action occurs
- wp_redirect() not working in Insert PHP plugin in WordPress
- 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
- Saving changes in wp_editor
- Change the backend language of a single plugin
- Executing my function once on a specific time
- Set Post Format if find a string in title or post content
- Display data on Word Press site posts and pages from mysql table
- Notepad sticky plugin
- Output array into one table cell
- WooCommerce Custom Product to checkout
- How to periodically scrape and cache strings from remote txt files. – My First Plugin
- How to stop or remove an action being called inside a function of an extended class
- Automatically add attributes to woocommerce product?
- WP Post Template – Templates in own folder
- Apple push notification doesn’t work
- Avoid class name collision when using third party libraries in plugins?