Closed reignofpravin closed 5 years ago
I need to remove every default active widgets from sidebars. Not to disable them, just to remove from sidebar. Here is what I did,
function disable_all_widgets( $sidebars_widgets ) { $sidebars_widgets = array( false ); return $sidebars_widgets; }
function ocdi_before_widgets_import( $selected_import ) { add_filter( 'sidebars_widgets', 'disable_all_widgets' ); } add_action( 'pt-ocdi/before_widgets_import', 'ocdi_before_widgets_import' );
Hi,
I'm not sure how exactly to remove the widgets from sidebar, but I'm quite sure that there is not an issue with this plugin so I'm closing the issue.
I need to remove every default active widgets from sidebars. Not to disable them, just to remove from sidebar. Here is what I did,
function disable_all_widgets( $sidebars_widgets ) { $sidebars_widgets = array( false ); return $sidebars_widgets; }
function ocdi_before_widgets_import( $selected_import ) { add_filter( 'sidebars_widgets', 'disable_all_widgets' );
} add_action( 'pt-ocdi/before_widgets_import', 'ocdi_before_widgets_import' );