Change default sidebar position

To change default sidebar option selected ( right ) in the post/page edit, add this code in your child theme’s functions.php

function dt_change_default_sidebar() {
global $DT_META_BOXES;

if ( $DT_META_BOXES ) {

if ( isset($DT_META_BOXES[ 'dt_page_box-sidebar' ]) ) {
$DT_META_BOXES[ 'dt_page_box-sidebar' ]['fields'][0]['std'] = 'left';

add_action( 'admin_init', 'dt_change_default_sidebar', 20);

Will only apply to new pages/posts, pages posts with already selected sidebar will not effect this.

If it does not work, please try:

add_action( 'admin_init', 'dt_change_default_sidebar', 30);

View in github