# Add the Blog Page to Yoast Breadcrumbs on Posts

> Inserts your blog page (Settings > Reading > Posts page) after "Home" in the Yoast SEO breadcrumbs of single posts and post archives.

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

## Code

```php
add_filter( 'wpseo_breadcrumb_links', function ( $links ) {
    $blog_id = (int) get_option( 'page_for_posts' );

    if ( ! $blog_id || ! is_array( $links ) || ! ( is_singular( 'post' ) || is_category() || is_tag() || is_date() ) ) {
        return $links;
    }

    foreach ( $links as $link ) {
        if ( isset( $link['id'] ) && (int) $link['id'] === $blog_id ) {
            return $links;
        }
    }

    array_splice( $links, 1, 0, array( array( 'url' => get_permalink( $blog_id ), 'text' => get_the_title( $blog_id ), 'id' => $blog_id ) ) );

    return $links;
} );
```

## Notes

Does nothing when no posts page is set or Yoast already shows it.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Add the Blog Page to Yoast Breadcrumbs on Posts" 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/
