Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,

    Try to add the below code to the child theme’s functions.php file and check it works or not –

    function owp_off_canvas_filter_button() {
    
    	$text = get_theme_mod( 'ocean_woo_off_canvas_filter_text' );
    	$text = oceanwp_tm_translation( 'ocean_woo_off_canvas_filter_text', $text );
    	$text = $text ? $text: esc_html__( 'Filter', 'oceanwp' );
    
    	$output = '<a href="#" class="oceanwp-off-canvas-filter"><i class="icon-menu"></i><span class="off-canvas-filter-text">'. esc_html( $text ) .'</span></a>';
    
    	echo $output;
    }
    add_action( 'woocommerce_before_shop_loop','owp_off_canvas_filter_button', 10 );
    Thread Starter skllmyh

    (@skllmyh)

    It didn’t work.

    The code added one more Filter button on /shop page.
    Image: https://gyazo.com/7dcc8589899aa36f84ab9a1671483185

    What I want is: I want “Filter” button to be on all categorized pages.

    If I go to https://www.website.com/t-shirts, there I want to see Filter button with Tshirt options.

    I want to display here: https://gyazo.com/1c2857015abbf0e52840a857f3ed6940

    • This reply was modified 5 years, 1 month ago by skllmyh.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add Filter button on another product pages’ is closed to new replies.