WordPress.org

Support

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

[Plugin: WooCommerce] Editing Breadcrumbs for Single Product Pages

  • matthewmsexton

    @matthewmsexton

    The breadcrumbs seem to operate differently between the general shop pages and the single product pages.

    I was able to locate the shop page “breadcrumb.php” but can’t seem to find a similar PHP file for the single-product pages.

    Can anyone help me to resolve this? Much obliged.

    http://wordpress.org/extend/plugins/woocommerce/

Viewing 1 replies (of 1 total)
  • bheadrick

    @bheadrick

    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.
Skip to toolbar