Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1319385

    Hi Victoria,
    I’d like to show beadcrumbs on posts as: “Home –> post title” and not showing post categories among them..
    I mean, showing the breadcrumb post path driectly from root, is it possible to customise a post to show the breadcrumb path just with Home and post title path?
    Many thanks.
    David

    #1319824

    Hey seomar,

    Thank you for the inquiry.

    Are you trying to remove the post category from the breadcrumb? If yes, then adding the following snippet in the functions.php file should help.

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

    Best regards,
    Ismael

    #1320130

    thanks Ismael, working fine :)

    #1320323

    Hi,

    Great, I’m glad that Ismael could help you out. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

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