Skip to content

Instantly share code, notes, and snippets.

@sebastianmoran-archive
Created December 31, 2021 01:03
Show Gist options
  • Select an option

  • Save sebastianmoran-archive/8ab0631e800db4a5f0ddd6e42700db8c to your computer and use it in GitHub Desktop.

Select an option

Save sebastianmoran-archive/8ab0631e800db4a5f0ddd6e42700db8c to your computer and use it in GitHub Desktop.
Remove home from breadcrumbs in Yoast SEO
add_filter( 'wpseo_breadcrumb_single_link' ,'wpseo_remove_home_breadcrumb', 10 ,2);
function wpseo_remove_home_breadcrumb( $link_output , $link ){
$text_to_remove = 'Home';
if( $link['text'] == $text_to_remove ) {
$link_output = '';
}
return $link_output;
}
@sebastianmoran-archive
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment