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

    Is there a way to remove categories from the breadcrumb trail? Instead of “site/category/blog title” I would like “site/blog title.”

    Thanks

    #1335777

    Hey macjeffff,
    Try adding this code to the end of your functions.php file in Appearance ▸ Editor:

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

    Best regards,
    Mike

    #1335782

    That worked.

    Thank you, Mike!

    #1335784

    Hi,
    Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Remove categories from Blog breadcrumbs’ is closed to new replies.