Remove Widget on archive page with parameter in URL / remove action needed
-
Hi,
great plugin.Question: need code snipped for functions.php to remove all widgets which are in one group on every page which has the parameter “wpt_view” in the url.
right now i am using the following snippet, which disables the whole sidebar. negative side effect: Cart widget is also gone!
so is there a remove_action for a filtergroup available like : remove_action( ‘storefront_sidebar’, ‘storefront_get_sidebar’, 10 );
or another way? thanks!
add_action( ‘get_header’, ‘bbloomer_remove_storefront_sidebar’ );
function bbloomer_remove_storefront_sidebar() {
if ( absint($_GET[‘wpt_view’]) == 1 ) {
remove_action( ‘storefront_sidebar’, ‘storefront_get_sidebar’, 10 );
}
}
- The topic ‘Remove Widget on archive page with parameter in URL / remove action needed’ is closed to new replies.