Adding Sidebar ID
-
HI, I added the following to register a sidebar:
/*Register Blog Page Sidebar*/
add_filter( ‘pt-ocdi/import_files’, ‘ocdi_import_files’ );
function ocdi_before_widgets_import( $selected_import ) {
$sidebars = array(
‘BlogPage’ => ‘Blog Page’,
);
update_option( ‘sbg_sidebars’, $sidebars );
}
add_action( ‘pt-ocdi/before_widgets_import’, ‘ocdi_before_widgets_import’ );And it worked – the sidebar was added. However I wanted to import widgets into this sidebar but the import is looking for the widget ID:
et_pb_widget_area_1 : Sidebar does not exist in theme (moving widget to Inactive)Is there a way I can add the widget ID to the code above?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Adding Sidebar ID’ is closed to new replies.