Yoast SEO
How do I remove CPT from breadcrumb trail? (4 posts)

  1. jsperl
    Posted 2 years ago #


    Here is my site showing a post in Custom Post Type "Items":


    What I'm looking for is the the breadcrumb trail to read

    Home » Finance » Budgeting

    rather than

    Home » Items » Finance » Budgeting

    Anyone know how to do this?


  2. jrf
    Posted 2 years ago #

    There are a number of filters available which you can use to change the output.

    You'll probably want the wpseo_breadcrumb_single_link filter in this case.

  3. jsperl
    Posted 2 years ago #

    Thank you Juliette! You wouldn't happen to know of a good tutorial for php beginners on how to use this filter by any chance?

  4. jrf
    Posted 2 years ago #

    @jsperl, this filter is no different from other filters, so any tutorial on how to create filter functions should do:

    Most important thing to remember is to return the result.

    Basic setup could look like:

    add_filter( 'wpseo_breadcrumb_single_link', 'my_breadcrumb_filter_function' );
    function my_breadcrumb_filter_function( $full_link, $link_info ) {
    	/* Do something, for instance:
    	   - test the link info for certain information and clear the $full_link, i.e.:
    	if( $link_info['url'] === 'xyz' ) {
    		$full_link = '';
    	return $full_link;

    You could also have a look at the wpseo_breadcrumb_links filter which is run before the crumbs are converted to links.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Yoast SEO
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.