Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author James Koster

    (@jameskoster)

    You’d need to query the depth of the archive then

    remove_action( 'woocommerce_before_shop_loop', array(&$this, 'gridlist_toggle_button'), 20);
    Thread Starter sparx

    (@sparx)

    Thanks, I tried adding that code to both my theme’s functions and in the grid plugins php file, but nothing seems to happen.

    Any thoughts?

    Many thanks is advance,

    sparx

    Plugin Author James Koster

    (@jameskoster)

    Sorry the code was wrong, try:

    if ( ! is_product_category() ) {
    remove_action( 'woocommerce_before_shop_loop', 'gridlist_toggle_button', 20);
    }

    Hi I’ve just tried using

    remove_action( 'woocommerce_before_shop_loop', 'gridlist_toggle_button', 20);

    and it dosen’t work. Neither does trying to use add_action hook on another tag. Am I correct that just specifiying this in the functions.php of my theme should work?

    I’m trying to move the button to before the main content so I figured remove the action using the above and then do

    remove_action( 'woocommerce_before_main_content', 'gridlist_toggle_button', 20, 0);

    is this the correct way to go about it?

    Thanks,

    Mark

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: WooCommerce Grid / List toggle] Exclude from certain pages’ is closed to new replies.