I'm trying to rename and rearange the Widgets panel in WP Customizer area (apperance > customizer). So far I've only tried to rename the section, I would also like to move it to the bottom.
I'm using this code:
$wp_customize->get_section('widgets')->title = __( 'Sidebar & Footer widgets' );
Here's the complete code:
But when I save and reload customizer I keep getting the following warning
Warning: Creating default object from empty value in /home/siteid4/public_html/_test4/wp-content/themes/bb-theme-child/functions.php on line 51
Line 51 is the code renaming the widgets section.
The weird thing is that there are various section NOT from wordpress, they are added by other plugins. Those I have no problem renaming, it's only the WP sections I am having trouble with.
Any idea on how to rename and move this section?