Skip to content

Instantly share code, notes, and snippets.

@grayayer
Forked from thecodepoetry/functions.php
Created October 26, 2016 01:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grayayer/e8b32892478ee655db6402ee360f58fe to your computer and use it in GitHub Desktop.
Save grayayer/e8b32892478ee655db6402ee360f58fe to your computer and use it in GitHub Desktop.
To change default pre selected sidebar position in The7 and Armada
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'; // use disabled to disable sidebar
}
}
}
add_action( 'admin_init', 'dt_change_default_sidebar', 30 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment