If you like our themes and support, please SHARE our website! https://theme-sky.com/wordpress-themes/

Okay
  Public Ticket #1303685
Use V1 breadcrumb only for single product pages
Closed

Comments

  •  2
    Hassan started the conversation

    Hello,

    I am using breadcrumb V3 on whole my website but since it take some space i want to use V1 only for all single product pages. But since i have more than 2000 products i can't edit each product and do this. Is it possible to show v1 breadcrumb on all single product pages but show v3 on all other pages?

    Thanks you

  •  567
    Stormit replied

    Hi Hassan,

    You can add the custom PHP code below into your sanzo_child_template_redirect function

    global $sanzo_theme_options;
    if( is_singular('product') ){
        $sanzo_theme_options['ts_breadcrumb_layout'] = 'v1';
    }
    

    It should look like this

    add_action('template_redirect', 'sanzo_child_template_redirect');
    function sanzo_child_template_redirect(){
        // Some other codes
        global $sanzo_theme_options;
        if( is_singular('product') ){
            $sanzo_theme_options['ts_breadcrumb_layout'] = 'v1';
        }
        // Some other codes
    }
    

    Best regards,