Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #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
    /Michael

    #333256

    Hi 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,
    Yigit

    #333257

    Hi 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ünter

    #333414

    Hi 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
    /Michael

    #334346

    Hi 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

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.