• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Woo Commerce and "SHOP" on breadcrumbs

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Woo Commerce and "SHOP" on breadcrumbs

This topic is: not resolved

Tagged: breadcrumbs, WooCommerce

  • This topic has 3 replies, 2 voices, and was last updated 7 years, 1 month ago by Tree78.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • April 11, 2016 at 10:38 am #183380
    Tree78
    Participant

    I am having this problem on a couple of websites when using breadcrumbs. For whatever reason the "shop" page isn't included in the breadcrumb trail. If you go from a page to shop Example

    Home>Shop

    It shows, but right after you click to something else "shop" is gone and it is replaced with just home only and the rest of the breadcrumb. So it reads for example:

    Home>Aviation. I want it to read Home>Shop>Aviation

    Why does that get cancelled out in Genesis woo commerce setup?

    April 11, 2016 at 1:07 pm #183413
    carasmo
    Participant

    This goes inside your functions.php file or your functions plugin. It is not recommended to use the Appearance editor, use FTP and a code editor to do developer work. If you make an error with the Appearance editor, you will need FTP to fix it. Errors in the Appearance editor will result in your entire site not working until you correct the php errror.

    /** 
     *
     * Add Shop to Breadcrumb
     * Requires Genesis Connect for WooCommerce 
     *
     */
    function yourthemeprefix_breadcrumb_shop( $crumb, $args ) {
    
    	if ( is_singular( 'product' ) || is_tax( 'product_cat' ) || is_tax( 'product_tag' ) ) {
    		$shop_id    = wc_get_page_id( 'shop' );
    		$shop_title = get_the_title( $shop_id );
    
    		$prepend = gencwooc_get_crumb_link( get_permalink( $shop_id ), $shop_title, $shop_title, $args['sep'] );
    		$crumb = $prepend . $crumb;
    	}
    
    	return $crumb;
    
    }
    add_filter(  'genesis_archive_crumb',  'yourthemeprefix_breadcrumb_shop', 11, 2  );
    add_filter(  'genesis_single_crumb',  'yourthemeprefix_breadcrumb_shop', 11, 2  );
    
    

    Genesis Theme Customization and Help

    April 11, 2016 at 1:10 pm #183415
    carasmo
    Participant

    Reference: https://wordpress.org/support/topic/still-having-breadcrumbs-issues#post-7423878


    Genesis Theme Customization and Help

    April 13, 2016 at 8:58 am #183524
    Tree78
    Participant

    Hi Carasmo,

    Thank you for the help. The code above actually didn't work and returned a "non responsive page" on the site. So I fixed it. I did use the code you referenced though and that worked, so thank you.

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble