Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter kalyori

    (@kalyori)

    I managed to do what I wanted with the following code:

    add_filter( 'tc_show_slider' , 'show_slider_in_categories' );
    function show_slider_in_categories( $bool ) {
        $isBlogPage = is_home();
    
        $check = is_category() || is_product_category() || $isBlogPage || is_archive() || is_search() || is_singular();
        $result = $check ? true : $bool;
    
        return $result;
    }
    
    add_filter( 'tc_slider_name_id', 'force_slider_name');
    function force_slider_name( $original_slider_name ) {
        $isBlogPage = is_home();
    
        $check = is_category() || is_product_category() || $isBlogPage || is_archive() || is_search() || is_singular();
    
        $result = $check ? 'shop' : $original_slider_name;
    
        return $result;
    }
    
    add_filter( 'tc_slider_active_status' , 'force_active_slider' );
    function force_active_slider($bool) {
        $isBlogPage = is_home();
        $check = is_category() || is_product_category() || $isBlogPage || is_archive() || is_search() || is_singular();
        $result = $check ? true : $bool;
    
        return $result;
    }
    //display in full width
    add_filter( 'tc_slider_layout' , 'force_full_width' );
    function force_full_width($bool) {
        $isBlogPage = is_home();
        $check = is_category() || is_product_category() || $isBlogPage || is_archive() || is_search() || is_singular();
        $result = $check ? true : $bool;
        return $result;
    }
    //allow autoplay
    add_filter( 'tc_customizr_script_params', 'allow_autoplay');
    function allow_autoplay( $_params ) {
      $_params['shop'] = 'shop';
      return $_params;
    }
Viewing 1 replies (of 1 total)