Решение, как в WordPress администратору показывать одну тему, а посетителям другую
function custom_load_template() { return 'twentytwelve'; } add_filter('template', 'custom_load_template'); add_filter('stylesheet', 'custom_load_template');
<? /* Plugin Name: Отдельная тема для администратора Description: Плагин изменяет тему для администратора. */ // вешаем на plugins_loaded, чтобы можно было определить пользователя add_action('plugins_loaded', 'switch_theme_for'); function switch_theme_for(){ // условия только для администраторов if(!current_user_can('manage_options')) return; add_filter( 'template', 'custom_load_template' ); add_filter( 'stylesheet', 'custom_load_template' ); } function custom_load_template(){ return 'twentytwelve'; }