Support » Plugin: WooCommerce » [Plugin: WooCommerce] Editing Breadcrumbs for Single Product Pages

Viewing 1 replies (of 1 total)
  • same code is used for both.

    sincle-product.php shows

    /**
    		 * woocommerce_before_main_content hook
    		 *
    		 * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
    		 * @hooked woocommerce_breadcrumb - 20
    		 */

    in woocommerce-hooks.php

    add_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 );

    in woocommerce-template.php

    function woocommerce_breadcrumb( $args = array() ) {
    
    		$defaults = array(
    			'delimiter'  => ' › ',
    			'wrap_before'  => '<div id="breadcrumb" itemprop="breadcrumb">',
    			'wrap_after' => '</div>',
    			'before'   => '',
    			'after'   => '',
    			'home'    => null
    		);
    
    		$args = wp_parse_args( $args, $defaults  );
    
    		woocommerce_get_template( 'shop/breadcrumb.php', $args );
    	}

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WooCommerce] Editing Breadcrumbs for Single Product Pages’ is closed to new replies.