Tagged: breadcrumbs
-
AuthorPosts
-
October 13, 2021 at 5:16 pm #1324785
Hello, I have two issues with the breadcrumbs of my website’s posts:
1. The correct breadcrumbs should be: Home > News > Postname. However, the breadcrumbs showing up are: Home > Postname > News > Postname
2. In addition, “News” should link to my News page (/news). Instead, it links to /category/news.I hope you can help!
Best,
Albert
October 14, 2021 at 9:31 am #1324876Hey forestrygy,
Thank you for the inquiry.
The breadcrumb works correctly in the demo.
// https://kriesi.at/themes/enfold/2014/04/28/new-electric-cars-are-getting-really-fast/
Did you use the avf_breadcrumb_trail filter in the functions.php file or modify anything in the theme? We were not able to check the theme options because the account above is not an admin.
Best regards,
IsmaelOctober 14, 2021 at 9:39 am #1324878Hi Ismael,
I didn’t modify anything in the functions.php.
I have created an admin account for you. See details attached.
Thank you,
Albert
October 18, 2021 at 5:58 am #1325354Hi,
Thank you for the info.
We have set the News page as the default blog page in the Enfold > Theme Options panel, which removes the duplicated post title in the breadcrumb but the first category (News) is now included in the breadcrumb trail, so it looks duplicated (Home/News/News/Post Name). You may need to replace the name of the page or use a different category.
If that is not option, we could use the avf_breadcrumb_trail filter in the functions.php file to remove the category from the breadcrumb.
function ava_remove_element_from_bctrail( $trail, $args ) { if ( is_single() ) { unset ($trail[2]); } return $trail; } add_filter( 'avia_breadcrumbs_trail', 'ava_remove_element_from_bctrail', 50, 2 );
Best regards,
IsmaelOctober 18, 2021 at 12:49 pm #1325411Hi Ismael,
Changing the name of the page is not an option. So, as you suggest, we should use the avf_breadcrumb_trail filter.
However, I don’t understand why the breadcrumbs are working like that. Is this some kind of error of the theme? Maybe something to look into it in future Enfold updates.
Thank you,
Albert
October 19, 2021 at 5:35 am #1325511Hi,
Thank you for the update.
However, I don’t understand why the breadcrumbs are working like that.
It is not an error and the trail is not actually duplicated. It looks like it but it is not. It just so happens that the category and the page in the site have the same name, which is “News”. To remove the first category or the page from the trail, you have to use the filter above.
Best regards,
IsmaelOctober 20, 2021 at 12:39 pm #1325718Hi Ismael,
Thank you, I understand what you mean. All clear. For now, I will leave it as it is.
Best,
Albert
October 21, 2021 at 6:10 am #1325793 -
AuthorPosts
- You must be logged in to reply to this topic.