[Plugin: Breadcrumb NavXT] Small issue with breadcrumbs when viewing a single post
-
Hi mtekk,
Thank a lot for this wonderful plugin, don’t know what would I do without it. What I’m experiencing is not actually an issue, but it’s rather a question of how to modify a certain thing. Here goes:
I built a website for a client that has a products section. All the products are grouped based on categories and subcategories. The thing is that my client wanted to also have some explanatory static texts above each product page, so what I did was to go with pages. So, for each category I have set up a page with the same slug as the corresponding category and I’m using WP_Query to display products on a page from the matching category with the matching slug.
Further on, each product is a single post and it belongs to Products as the main category and to its subcategory, for example, Shoes, and then Running Shoes.
Here’s an example of the Products structure:
Products (main page)
– Shoes (a subpage to Products)
— Running Shoes (subpage to Products and further on a subpage to Shoes)
– Hoodies (a subpage to Products)
etc.So, basically my structure consists of pages and subpages that each filter products from matching categories and subcategories when clicked. So, if I click on Products it will show ALL products, if I want to narrow it down to Shoes I click Shoes and it only shows shoes. So, here while I’m browsing through the pages and subpages the breadcrumbs work flawless. So, I have Products > Shoes > Running Shoes (in the address bar http://www.domain.com/products/shoes/running-shoes).
But when I click on a certain single item, I go into the single post and this is where it all goes wrong. While I’m on a single post if I try to navigate with the breadcrumbs, it adds the category base in the URL becoming http://www.domain.com/category/products/shoes/running-shoes/adidas-stan-smith which leads me to a unformatted looking page as my categories don’t have any templates applied to them as I’m going with pages.
I know that this is the logic of how WordPress is generating the URL for categories, and that your plugin is using exactly that logic, but since my structure is made of pages and subpages is there a way I can make the breadcrumbs in the single post to behave the same as they are on the pages?
Sorry for the excessive post, but I tried to describe my issue the best I could.
Thanks a lot in advance!
Best regards
The topic ‘[Plugin: Breadcrumb NavXT] Small issue with breadcrumbs when viewing a single post’ is closed to new replies.