Title: Remove current post title from breadcrumbs
Last modified: August 20, 2016

---

# Remove current post title from breadcrumbs

 *  Resolved [Dutchintouch](https://wordpress.org/support/users/dutchintouch/)
 * (@dutchintouch)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/remove-current-post-title-from-breadcrumbs/)
 * I have seen this question asked regarding Yoast’s old Breadcrumbs plugin, but
   not the breadcrumbs feature in WordPress SEO by Yoast:
 * Is there a way to remove the title of the current post (or page) from the breadcrumbs?
 * The reason for this question is that I wonder whether repeating the title twice
   on the post has a detrimental effect.
 * [http://wordpress.org/extend/plugins/wordpress-seo/](http://wordpress.org/extend/plugins/wordpress-seo/)

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/remove-current-post-title-from-breadcrumbs/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/remove-current-post-title-from-breadcrumbs/page/2/?output_format=md)

 *  [Luke](https://wordpress.org/support/users/danceyrselfclean_admin/)
 * (@danceyrselfclean_admin)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/remove-current-post-title-from-breadcrumbs/#post-3402302)
 * I would also like to know how to do this. I just want to remove the current post/
   page from the breadcrumbs.
 * Has anyone found a way of doing this?
 *  [Liew Cheon-Fong](https://wordpress.org/support/users/lcf/)
 * (@lcf)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/remove-current-post-title-from-breadcrumbs/#post-3402304)
 * +1
 *  [ViPeRx007](https://wordpress.org/support/users/viperx007/)
 * (@viperx007)
 * [13 years ago](https://wordpress.org/support/topic/remove-current-post-title-from-breadcrumbs/#post-3402305)
 * I’m trying to figure out how to do this as well…
 *  [ViPeRx007](https://wordpress.org/support/users/viperx007/)
 * (@viperx007)
 * [13 years ago](https://wordpress.org/support/topic/remove-current-post-title-from-breadcrumbs/#post-3402306)
 * I did some digging around and sort of got this working. Or at least it’s closer
   anyway.
 * **Edit this file:**
    /plugins/wordpress-seo/frontend/class-breadcrumbs.php
 * Line 267, deleted this:
 *     ```
       if ( isset( $opt['breadcrumbs-boldlast'] ) && $opt['breadcrumbs-boldlast'] ) {
                           $link_output .= '<strong property="v:title">' . esc_html( $link['text'] ) . '</strong>';
                       } else {
                           $link_output .= '<span property="v:title">' . esc_html( $link['text'] ) . '</span>';
                       }
       ```
   
 * This removes the current page but I’m not sure exactly how to take off the trailing
   separator. I’m not sure if this is the best way to accomplish this task considering
   it’ll probably be overwritten with any plugin update, but it’s a start.
 *  [nathan_dawson](https://wordpress.org/support/users/nathan_dawson/)
 * (@nathan_dawson)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/remove-current-post-title-from-breadcrumbs/#post-3402322)
 * This may be a bit late but I removed the title from posts with the following 
   modifications. It doesn’t apply to pages but that can be achieved with some tweaks.
   Also further editing is necessary if you apply styling to the last breadcrumb
   such as making it bold.
 * **Edit this file:**
    /plugins/wordpress-seo/frontend/class-breadcrumbs.php
 * Change line 275:
    `$output .= apply_filters( 'wpseo_breadcrumb_single_link', 
   $link_output, $link );`
 * To:
 *     ```
       if ( $i < ( count( $links ) - 1 ) || ! is_single() )
       				$output .= apply_filters( 'wpseo_breadcrumb_single_link', $link_output, $link );
       ```
   
 *  [skmarc](https://wordpress.org/support/users/skmarc/)
 * (@skmarc)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/remove-current-post-title-from-breadcrumbs/#post-3402330)
 * First Why did they have such a dumb setting? Repeating of the Title will not 
   be good IMO
 * Next thanks a lot to nathan_dawson . It actually works. May be the next update
   of yoast will take care of this
 *  [Juliette Reinders Folmer](https://wordpress.org/support/users/jrf/)
 * (@jrf)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/remove-current-post-title-from-breadcrumbs/#post-3402331)
 * All,
 * There is filter available for this. The breadcrumbs are first put into an array
   and then send to a method to create the output string. The filter is run just
   before the links are being send to the output generating method, so you can remove
   the last item of the array and it should all work 😉
 * Add something along the lines of the following to your (child-)theme’s functions.
   php file:
 *     ```
       function adjust_my_breadcrumbs( $linksarray ) {
       	if( is_array( $linksarray ) && count( $linksarray ) > 0 ) {
       		array_pop( $linksarray );
       	}
       	return $linksarray;
       }
       add_filter( 'wpseo_breadcrumb_links', 'adjust_my_breadcrumbs' );
       ```
   
 * This will also upgrade-proof the adjustment.
 * Hope this helps!
 * Smile,
    Juliette
 *  [Juliette Reinders Folmer](https://wordpress.org/support/users/jrf/)
 * (@jrf)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/remove-current-post-title-from-breadcrumbs/#post-3402332)
 * Actually, you may want to change that code snippet to the below to avoid accidentally
   removing the category on category pages etc:
 *     ```
       function adjust_my_breadcrumbs( $linksarray ) {
       	$last = count( $linksarray );
       	if( ( is_array( $linksarray ) && $last > 0 ) && isset( $linksarray[$last]['id'] ) ) {
       		array_pop( $linksarray );
       	}
       	return $linksarray;
       }
       add_filter( 'wpseo_breadcrumb_links', 'adjust_my_breadcrumbs' );
       ```
   
 *  [Liew Cheon-Fong](https://wordpress.org/support/users/lcf/)
 * (@lcf)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/remove-current-post-title-from-breadcrumbs/#post-3402333)
 * [@jrf](https://wordpress.org/support/users/jrf/) Thanks for the code snippet.
   I applied on my child theme functions.php but it makes no different.
 * theme: canvas
    url: [http://www.liewcf.com/maxis-unlimited-data-plan-opera-mini-15297/](http://www.liewcf.com/maxis-unlimited-data-plan-opera-mini-15297/)
 *  Plugin Contributor [Joost de Valk](https://wordpress.org/support/users/joostdevalk/)
 * (@joostdevalk)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/remove-current-post-title-from-breadcrumbs/#post-3402334)
 * They’re not from my SEO plugin but from Woo’s breadcrumbs function it seems, 
   which uses an old copy of my plugins code. So you’ll have to disable it there
   and then enable the breadcrumbs in WordPress SEO…
 *  [Liew Cheon-Fong](https://wordpress.org/support/users/lcf/)
 * (@lcf)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/remove-current-post-title-from-breadcrumbs/#post-3402335)
 * [@joost](https://wordpress.org/support/users/joost/) thanks for reply. It is 
   from WordPress SEO. Tested by switching “Breadcrumbs Settings” in WordPress SEO
   plugin, after I did (again) WooThemes SEO framework import & delete as instructed
   in [http://yoast.com/welcome-woothemes-users/](http://yoast.com/welcome-woothemes-users/)
 * Do you have any suggestions? Thank you.
 *  [Juliette Reinders Folmer](https://wordpress.org/support/users/jrf/)
 * (@jrf)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/remove-current-post-title-from-breadcrumbs/#post-3402336)
 * Sorry, small code fix – this should work:
 *     ```
       function adjust_my_breadcrumbs( $linksarray ) {
       	$last = count( $linksarray );
       	if( ( is_array( $linksarray ) && $last > 0 ) && isset( $linksarray[$last-1]['id'] ) ) {
       		array_pop( $linksarray );
       	}
       	return $linksarray;
       }
       add_filter( 'wpseo_breadcrumb_links', 'adjust_my_breadcrumbs' );
       ```
   
 *  [Liew Cheon-Fong](https://wordpress.org/support/users/lcf/)
 * (@lcf)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/remove-current-post-title-from-breadcrumbs/#post-3402337)
 * [@jrf](https://wordpress.org/support/users/jrf/) Thanks for the updated code.
   It works to remove post title, but the category’s link is removed as well.
 *  [Juliette Reinders Folmer](https://wordpress.org/support/users/jrf/)
 * (@jrf)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/remove-current-post-title-from-breadcrumbs/#post-3402340)
 * [@lcf](https://wordpress.org/support/users/lcf/) I see what you mean….
 * Well, it’s either that or being left with a separator at the end of your breadcrumb…
 * If you’d rather have the latter, you can use this in your functions.php file:
 *     ```
       function adjust_single_breadcrumb( $link_output, $link ) {
       	if( isset( $link['id'] ) && strpos( $link_output, 'breadcrumb_last' ) !== false ) {
       		$link_output = '';
       	}
       	return $link_output;
       }
       add_filter('wpseo_breadcrumb_single_link', 'adjust_single_breadcrumb', 10, 2 );
       ```
   
 * I’ll be sending a pull request to [@yoast](https://wordpress.org/support/users/yoast/)
   to sort this out once and for all in a future version.
 * Once that’s been accepted & released, you’ll be able to use this snippet:
 *     ```
       function adjust_single_breadcrumb( $link_output, $link ) {
       	if( isset( $link['id'] ) && strpos( $link_output, 'breadcrumb_last' ) !== false ) {
       		$link_output = '';
       	}
       	return $link_output;
       }
       add_filter('wpseo_breadcrumb_single_link_with_sep', 'adjust_single_breadcrumb', 10, 2 );
       ```
   
 * If you like, you can just add this last snippet to your functions.php file and
   once my change has been included in the plugin and you’ve upgraded, it will automatically
   work for you.
 * Hope this helps.
 * Smile,
    Juliette
 *  [Liew Cheon-Fong](https://wordpress.org/support/users/lcf/)
 * (@lcf)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/remove-current-post-title-from-breadcrumbs/#post-3402341)
 * Juliette, thank you!

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/remove-current-post-title-from-breadcrumbs/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/remove-current-post-title-from-breadcrumbs/page/2/?output_format=md)

The topic ‘Remove current post title from breadcrumbs’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-seo/assets/icon-256x256.gif?rev=3419908)
 * [Yoast SEO - Advanced SEO with real-time guidance and built-in AI](https://wordpress.org/plugins/wordpress-seo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-seo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-seo/reviews/)

 * 18 replies
 * 9 participants
 * Last reply from: [Jenni B](https://wordpress.org/support/users/jennicaprice/)
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/remove-current-post-title-from-breadcrumbs/page/2/#post-3402357)
 * Status: resolved