• 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 );
    }
    }

    • This topic was modified 4 years, 6 months ago by sinbad350.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author RazyRx

    (@razyrx)

    Hello @sinbad350,

    Plugin has two hooks braapf_check_widget_by_instance_group for group and braapf_check_widget_by_instance_single for single filter to prevent filters display.
    You need return TRUE for those hooks to remove filters from the page.

    Regards,
    Oleg

    Thread Starter sinbad350

    (@sinbad350)

    Hello @razyrx ,
    thanks for your feedback. i am not a develepor. searched your website for code example and the whole web (keywords: braapf_check_widget_by_instance_group braapf_check_widget_by_instance_single)

    unfortunately i didnt find any information.

    i thought i just need to remove this line remove_action( ‘storefront_sidebar’, ‘storefront_get_sidebar’, 10 ); in the code above and put in your code…

    to describe my question in detail: if this URL (https://127.0.0.1/wp/kategorie/salate-de/) then the widget group should be shown and if this URL (https://127.0.0.1/wp/kategorie/salate-de/?wpt_view=1) the filter group should BOT BE SHOWN.

    can u show some more detailed code snippet?
    ps: i bought your plugin and can send u license code if needed.

    thanks again for your help!

    Plugin Author RazyRx

    (@razyrx)

    Hello @sinbad350,

    If you have paid version of plugin, then please contact us on BeRocket site, login with your account and create new topic https://berocket.com/contact?step=issue

    Regards,
    Oleg

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Remove Widget on archive page with parameter in URL / remove action needed’ is closed to new replies.