Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #991849

    Hi support,

    Is it possible to remove “blog” from the breadcrumbs on posts?

    On this post, I would like the breadcrumbs to be – Your are here: Forside / Branche / Digital / Webbureau / OKEI.dk – just like the url.
    https://wordpressindex.dk/branche/digital/webbureau/okei-dk/

    Is there a way to extend the numbers of categories in the breadcrumbs?

    Thanks :-)

    /OKEI

    #992311

    Hey OKEI,

    Thank you for using Enfold.

    Use this filter to remove the first breadcrumb trail or the “blog” part.

    
    add_filter( 'avia_breadcrumbs_trail', 'avia_breadcrumbs_trail_mod', 50, 2 );
    function avia_breadcrumbs_trail_mod( $trail, $args ) 
    {
    	if ( is_single() ) 
    	{
    	     unset($trail[1]);
    	}
    
    	return $trail;
    }

    Best regards,
    Ismael

    #992958

    Thanks, Ismael :-)
    Works wonderfully, but only on the frontpage. Is there a way to make it work on all pages?

    Is there a way to extend the numbers of categories in the breadcrumbs?

    Thx.
    OKEI

    • This reply was modified 3 months, 2 weeks ago by  OKEI.
    #993182

    Hi,

    Thanks for the update.

    That filter is supposed to remove the first trail “blog” on post pages. The first trail is not displaying when I checked the above post.
    Unfortunately, you can’t add multiple categories to the trail. Only the first category will display.

    Best regards,
    Ismael

    #993878

    How can I remove “blog” from other pages and archives?

    https://wordpressindex.dk/branche/digital/webbureau/

    Thanks :-)

    #994167

    Hi,

    You have to remove the conditional function is_single.

    add_filter( 'avia_breadcrumbs_trail', 'avia_breadcrumbs_trail_mod', 50, 2 );
    function avia_breadcrumbs_trail_mod( $trail, $args ) 
    {
            unset($trail[1]);
    	return $trail;
    }

    Best regards,
    Ismael

    #995151

    YES – thank you very much!! ;-)

    Everything works fine now.

    Please close.

    Best regards,
    OKEI

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘Remove "blog" from breadcrumbs’ is closed to new replies.