Add ‘blog’ to breadcrumbs for single posts and post archives
-
I am using WooCommerce with Storefront and a child theme, and the breadcrumbs are working great for the products.
I have set the permalink for posts to be
/blog/%category%/%postname%/
and this shows up as expected in the address bar for single posts and post archives, however I would like the breadcrumbs to reflect this structure also.I have a page set for the blog and when clicking the blog link on the menu, the breadcrumbs are:
home > blog
– this is perfecthowever when clicking on a category, eg mycat, The breadcrumb is:
home > mycat
– where I want this to be:home > blog > mycat
Similarly on a single post, eg mypost, the breadcrumbs are
home > mycat > mypost
– I would like this to be:home > blog > mycat > mypost
To summarise, when viewing a single post or a post archive I would like a link in the breadcrumbs to the ‘blog’ page.
What would be the best way to achieve this?
- The topic ‘Add ‘blog’ to breadcrumbs for single posts and post archives’ is closed to new replies.