You can expand the WordPress customize area without plugins by applying a simple line of CSS.
.wp-full-overlay-sidebar {
width: 30% !important; /* The width of the customize area */
}
.wp-full-overlay.expanded {
margin-left: 30%; /* Here would be the width as same as the customize window width you set */
}
Hook the CSS to admin_enqueue_scripts()
function to load it in the WordPress customize area.
The CSS file enqueueing example is given below-
add_action('admin_enqueue_scripts', function() {
wp_enqueue_style('your-prefix-admin', get_template_directory_uri().'/assets/css/admin.css');
});
Note: This code should put into your theme’s functions.php
file. You should create a file named admin.css
in the assets/css directory (create the directory if it doesn’t exist) in your theme.
For child theme, you should the get_stylesheet_directory_uri()
function instead of the get_template_directory_uri()
function.