Menü schliessen
Created: December 27th 2013
Last updated: May 1st 2020
Categories: Wordpress
Author: Marcus Fleuti

Wordpress 3.8 - Anzahl Spalten im Dashboard bestimmen (set amount of columns within the dashboard

Donation Section: Background
Monero Badge: QR-Code
Monero Badge: Logo Icon Donate with Monero Badge: Logo Text
82uymVXLkvVbB4c4JpTd1tYm1yj1cKPKR2wqmw3XF8YXKTmY7JrTriP4pVwp2EJYBnCFdXhLq4zfFA6ic7VAWCFX5wfQbCC

Symptom

Seit WordPress 3.8 kann die Anzahl Spalten nicht mehr durch den User bestimmt werden. Stattdessen wird das Dashboard Layout durch das gewählte Template bestimmt (starting with WordPress 3.8 the Dashboard layout - and thus the amount of columns within the Dashboard configuration - has to be set within the template).

Howto

Editiere die Datei functions.php und passe die Werte entsprechend deinen Bedürfnissen an (edit the file functions.php and add the following lines. Adapt the number by the amount of columns you'd like to use):

/* set the Dashboard to a 3-column layout */
function dashboard_set_column($columns) {
    $columns['dashboard'] = 3;
    return $columns;
}
add_filter('screen_layout_columns', 'dashboard_set_column');
function shapeSpace_screen_layout_dashboard() { return 3; }
add_filter('get_user_option_screen_layout_dashboard', 'shapeSpace_screen_layout_dashboard');