• Resolved Marklcm

    (@marklcm)


    Hello
    the plugin works well.
    I am working on localhost with storefront theme (Woocommerce plugin installed) and breadcrumbs styled using a (slightly modified) version of one of your css examples (in child theme).

    To get the styling to apply to pages not associated with the Woocommerce plugin I had to add a body class to those pages

    add_filter( 'body_class','amazingstorefront_body_classes' );
    function amazingstorefront_body_classes( $classes ) {
     
        if ( ! is_shop() ) {
         
            $classes[] = 'woocommerce';
             
        }
         
        return $classes;
         
    }

    All was fine until I reduced the number of posts on the Blog (not Home) page to check pagination.
    With pagination the breadcrumbs are
    “Home-> Blog-> Page2” on the second page.
    The breadcrumbs don’t add an ‘a’ tag (link) to “Blog”, so it remains unstyled (which took me a while to work out). I first thought it a problem with the css.

    This isn’t a problem with the “Woocommerce Breadcrumbs” plugin, but wondered if it is expected behavior of the ‘Woocommerce plugin / Storefront combination’, and if there is a way around it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Anthony Hortin

    (@ahortin)

    I just had a quick look at one of my own test sites, using Storefront, and I can see what you mean. It’s not adding a link to the “Blog” crumb.

    Storefront looks like it’s using the standard WooCommerce breadcrumbs (some WooThemes themes disable the WooCommerce breadcrumbs in favour of the WooFramework Breadcrumbs).

    It looks like WooCommerce uses the templates/global/breadcrumb.php template to actually display the breadcrumb html. After having a quick look at the code, it looks like WooCommerce doesn’t seem to be storing the URL for the main blog archive page in the array that holds all the individual crumbs. This seems to be why there’s no link appearing.

    My only suggestion is to either debug what is happening when WooCommerce generates each of the individual crumbs for it’s breadcrumb trail, or remove the default breadcrumbs functionality altogether and replace it with your own custom solution.

    Thread Starter Marklcm

    (@marklcm)

    Thanks for your reply.I decided to go down the path of removing the breadcrumbs. Woocommerce must have changed something, as your plugin disable function and every advice I can find, including Woocommerce docs does not work.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Blog page breadcrumb style’ is closed to new replies.