-
AuthorPosts
-
October 8, 2014 at 6:02 pm #332596
Hi, I’m building a site with 4 sub levels and the bread crumbs on some pages are very long, is there some way to shorten them? Like only displaying two levels up for instance? Or just showing a set number of characters maximum?
Hope you can help, thanks
/MichaelOctober 9, 2014 at 3:15 pm #333256Hi musklick!
Please add following code to Quick CSS in Enfold theme options under General Styling tab
.title_container .breadcrumb { right: auto; top: 80%; }If that does not help, please post the link to your page where can see an example
Best regards,
YigitOctober 9, 2014 at 3:15 pm #333257Hi musklick!
Thank you for using our theme.
There is a fiterhook for the breadcrumb array, where you can remove the portion you do nt like.
In functions.php (or preferred in functions.php of the child theme) at the end add the following:
add_filter( 'avia_breadcrumbs_trail', 'my_custom_trail', 10, 2); function my_custom_trail($trail, $args) { // $trail is an array - each element is one part of the trail starting with 0 for the first entry of the trail // maipulate the array and return it return $trail; }Best regards,
GünterOctober 9, 2014 at 7:36 pm #333414Hi Yigit, thanks for your reply, now it looks much better :-)
Hi Günter, I’m very interested in that function but I don’t see any difference when I add it to functions.php, do I need to change any of the code?Thanks
/MichaelOctober 11, 2014 at 5:09 pm #334346Hi Micheal!
You won’t see anything happening because the function isn’t doing anything at the moment.
The $trail is what is output as breadcrumb.
This function allows you to custom construct that trail. Without knowing your exact requirements for the breadcrumb we wouldn’t be able to guide you any further. That said, if this modification is one which takes too long to be done, we can only advise that you hire a developer.
Best regards,
Arvish -
AuthorPosts
- You must be logged in to reply to this topic.
