0
votes

The breadcrumbs on my site don't display correctly so is someone able to advise how I can create custom breadcrumbs?

If I try and explain, if you visit the link below and select one of the prints:

http://mrsbest.co.uk/mini-best-art-prints/

You'll notice that the breadcrumb, looks like this:

You are here:Home / Christmas / Baby Gifts / Personalised Baby/Child’s Name Print

It displays the Christmas category instead of the actually file path, which should be:

You are here:Home / Mini Best Art Prints / Personalised Baby/Child’s Name Print

I understand why this is occurring - That's because "Mini Best Art Prints" is not a category. It's the title of a page. WordPress doesn't know that I'm displaying those products in that page with a shortcode. There's not any relation between the page and the products.

So I believe the solution is to create custom breadcrumbs. Is there any easy way of doing this, adapting the breadcrumb code or a plugin maybe?

Hope you can help :)

Kind Regards,

Sarah

1

1 Answers

0
votes

I don't think there's going to be one right answer here - but someone else might drop in with a homer.

First

Checkout your theme functions.php, and other files that may have a function related to breadcrumbs. (You ought to be able to search the documents for 'breadcrumbs'.) You may find that the theme is already doing something with the breadcrumbs. That lead may allow you to do your own work in your childtheme.

Second

If it turns out that you are running default breadcrumbs (your theme doesn't modify them), see if you can simply get a workaround with your permalink settings and category names. It appears that your URLs are not in agreement with your stated filepath:

If your desired breadcrumb is:

Home / Mini Best Art Prints / Personalised Baby/Child’s Name Print

It would seem your URL would have to be:

mrsbest.co.uk/mini-best-art-prints/personalised-baby/childs-name-print

But your real URL is:

mrsbest.co.uk/product/personalised-monochrome-bunny-print/

Third

You can probably start with this and build your custom breadcrumb structure: https://docs.woothemes.com/document/show-product-categories-in-wooframework-breadcrumbs/