Skip to content

Snippet: 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 );
All PHP snippets should be added via child theme's functions.php file or via a plugin. We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top