Hi,
my client uses product categories and sub-categories with parent pages.
It works fine. In the bread crumbs appears the “Product Categories” and if you click on it, it leads to the http://delruseurope.com/product-categories/
Is it possible to make this element of the bread crumbs not-clickable. (only the “Product Categories”).
The sub categories should be clickable.
Thank you,
Zsolt
Hi brandworld!
Try adding this to the bottom of your functions.php file.
add_filter( 'avia_breadcrumbs_trail', 'enfold_customization_breadcrumbs' );
function enfold_customization_breadcrumbs( $trail ) {
global $post;
if ( is_page(11) || 11 == $post->post_parent ) { $trail[0] = null; }
return $trail;
}
And then change “11” to the ID of that page. You may have to switch $trail[0] to $trail[1] because it looks like your hiding the home link with CSS.
Best regards,
Elliott
Hi,
01. Should I add this code to the functions-enfold.php or functions.php?
02. When you write “change 11 to the ID of that page” do you mean to write this number to the “Order” field at the “Page Attributes” section?
03. Yes, the home is hidden in the Bread crumbs: https://kriesi.at/support/topic/remove-home-from-breadcrumbs-2/
04. When you write “You may have to switch $trail[0] to $trail[1] ” you mean to use this in the functions-php:
if ( is_page(11) || 11 == $post->post_parent ) { $trail[1] = null; } ?
Thank you,
Zsolt
Hey!
1- You should add the code to Functions.php file
2- 11 is page ID. You should change it to match your page’s ID. You can right click on Chrome or Firefox to inspect elements to find page ID’s http://i.imgur.com/HyPTCRg.jpg
3 & 4 – Yes
Best regards,
Yigit
Ok, thank you.
Zsolt