Skip to content

Instantly share code, notes, and snippets.

@sebastianmoran-mainwp
Created December 31, 2021 01:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sebastianmoran-mainwp/8ab0631e800db4a5f0ddd6e42700db8c to your computer and use it in GitHub Desktop.
Save sebastianmoran-mainwp/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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment