Snippets: Remove Page Title From Breadcrumbs

// Remove page title from breadcrumbs
function my_remove_title_from_breadcrumbs( $trail ) {

    // Remove title (trail_end) for single posts
    if ( is_singular() ) {
        unset( $trail['trail_end'] );
    }

    // Return trail
    return $trail;

}
add_filter( 'wpex_breadcrumbs_trail', 'my_remove_title_from_breadcrumbs', 20 );

Version Required:2.0.2+

Snippet Type: PHP

Posted Under: Breadcrumbs

All PHP snippets should be added via a child theme's functions.php file.