# Remove the Current Page From Yoast Breadcrumbs

> Drops the last item (the page you are on) from the Yoast SEO breadcrumb trail, so the trail only shows the path leading to it.

- Type: PHP
- Runs: Frontend only
- Category: [Plugin Integrations](https://wpide.com/library/category/integrations/)
- Tags: yoast, breadcrumbs, navigation
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/yoast-breadcrumb-hide-current/

## Code

```php
add_filter( 'wpseo_breadcrumb_links', function ( $links ) {
    if ( is_array( $links ) && count( $links ) > 1 && ! is_front_page() ) {
        array_pop( $links );
    }

    return $links;
} );
```

## Notes

The homepage keeps its single crumb.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Remove the Current Page From Yoast Breadcrumbs" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
