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
- How to eliminate weird 404 errors in wp-admin?
- Simple form that saves to database
- How to call plugin path in JS?
- Get Current user email as a return string value
- Extension preview disapeared since WP 4.5.2
- Getting Custom Post Type content from main-site of a Multisite
- How can I make content disappear when a user logs in?
- How to save Clicks of a download link button while it doesn’t matter if we refresh the page or again login/logout
- Determining where fopen() is writing files when used from WordPress AJAX call [closed]
- New Plugin: Post update pushes a copy as a revision
- Overide a function that is inside a plugin
- How to install and activate a plugin via an external PHP script
- How to remove xmlns on language_attributes()?
- Add keywords meta to index.php page
- Download any file after submitting a form [closed]
- remove wp floating submenu in wp dashboard
- Redirecting a buddyboss profile tab to a different tab if not subscribed to a specific membership
- Why “Call to a member function on a non-object” in plugin only?
- What are the specifics of WordPress development I need to know? [closed]
- How to echo text in browser instead of download junk file?
- How to create a custom post type that contains another custom post type?
- WP Query. Is there a maximum size?
- Can i add custom code in Source, Header from function.php?
- $wpdb update query in plugin only updating one column
- Problem with isset and $_POST
- Adding media upload button to User Profile page (following a tutorial)
- Display Plugin Panels Outside of Admin Areas
- How to get specific string/value from an array? php [closed]
- WordPress Stock Update Programatically
- UTF-32be error WordPress
- Background Music WP [closed]
- Getting a ressource ID, from a WC_Order_Item_Product/Order
- Why is it important to check for isset and is_array before checking in_array in this example?
- How to delete a theme using AJAX
- same user role or copy the user role to be same as the other role
- Equivalent of admin.php for public pages
- Social share buttons text shows up on post excerpts
- How to displaying Custom image, text and default image logo from Redux Framework option panel
- Plugin Admin panel checkbox unchecked after submit
- Getting URL GET parameter with Code snippets and storing it in database?
- Trigger jQuery to add events after AJAX-loading table in admin plugin
- save_post_product action not firing
- Editing a coupon generating plugin
- wp_post not working, keeps redirecting to posts page
- Display pagination in reservation Plugin and and Print table as pdf
- Changing wordpress/woocommerce notices default message to other languages (text)
- Why does my custom plugin only function correctly once per page?
- What is the right way to populate a dropdown from MySql?
- make p tag collapsed after 3 rows
- Get full URL of WP plugin admin page
- I can’t view the orders on the woocomerce dashboard with the brainblocks plugin
- Generate and send ICS file through WordPress
- WP Plugin permissions – create new files
- Run a Change Role Cron Job on WordPress via cPanel
- How to display variables from plugin?
- How to make the first letter of a post title uppercase, in a plugin?
- Creating Admin Submenu Page via Class Method
- .htaccess file doesn’t work, with hundred tries
- How to change the product short description for each product with PHP?
- ACF Repeater Field Question [closed]
- How to create a dashboard for logged-in users with custom functionality? [closed]
- Cannot access variables within a widget
- How do I convince this button to do something when it is clicked?
- WordPress function to add text
- TheCartPress plugin – Make every item in store unique
- Doing action based on input from options menu
- Insert dynamic content into posts
- WordPress User Frontend Editing Custom Fields
- Combining JS files to one script
- My wordpress site wont load, it gives header error warnings
- Can anyone see a syntax error in this? [closed]
- Fast Tranfering my WordPress site to another server
- Duplicating wordpress install issue
- How to add custom html to the Media > Attachment Details modal?
- Refresh server side rendered block in Gutenberg without changing attributes or its content
- I want create woocommerec match products columns
- WordPress Custom Page Blog Template Pagination Problem (Pagination Not Displaying)
- How to override plugin function in code snippets WordPress
- How to create a “Most Popular” & “Latest” TAB in WordPress