Breadcrumbs for products in multiple categories
-
Hi, I use Proteo Theme and I have 3 issues regarding breadcrumbs.
I’m not a developer I’m a designer and I would appreciate your help in order to resolve these problems.
1. How can I saw breadcrumbs in product categories pages?
2. For products in multiple categories what needs to be done so that the breadcrumb will saw the path from the source category
In order to understand the above better, I’ll give an exampleI have products in multiple categories.
For example, the product “wooden calendar No1” belongs to the category “wooden calendars” and also to the subcategory “wooden-wall-calendars” who has parent categories calendars/wall/wooden-wall-calendars.My problem is when I go to the product page of a product that has multiple categories (in our example wooden calendar No1) by default shows always as breadcrumbs
home/calendars/wall/wooden-wall-calendars
no matter if go via the category wooden calendars.When I go via the category wooden calendars I need the breadcrumbs to be
home/wooden-calendars.And the last question
3. How can I set a primary category that will be chosen in the case that I go to the product directly and not via any category
I tried Yoast premium in order to set the primary category but with no success
Yoast has this article regarding Yoast SEO breadcrumbs.It mentions between others the bellow
Copy the following code into your theme where you want the breadcrumbs to be. If you are not sure, you will need to experiment with placement:
<?php
if ( function_exists(‘yoast_breadcrumb’) ) {
yoast_breadcrumb( ‘<p id=”breadcrumbs”>’,'</p>’ );
}
?>NOTE: Depending on your theme you may or may not need to add in the beginning <php and ending ?> php tags. If you are not sure, your theme developer can help.
Common places where you could place your breadcrumbs are inside your single.php and/or page.php file just above the page’s title. Moreover, another option that makes it really easy in some themes is by just pasting the code in header.php at the very end.
In most non-WooTheme themes, this code snippet should not be added to your functions.php file. If you have trouble locating the correct place to add the code, please contact the theme developer for assistance.
I have enabled breadcrumbs in Yoast Search appearance.
I tried to paste the code in different places but nothing.My question is where do I need to paste this code in order to be able to enable and use Yoast breadcrumbs.
Thank you much for you kindly assistance
Leonidas
- The topic ‘Breadcrumbs for products in multiple categories’ is closed to new replies.