Skip to content

Instantly share code, notes, and snippets.

@directionforward
Last active June 22, 2020 21:59
Show Gist options
  • Save directionforward/934e5bbf6626497e85b0bf93642b1bf7 to your computer and use it in GitHub Desktop.
Save directionforward/934e5bbf6626497e85b0bf93642b1bf7 to your computer and use it in GitHub Desktop.
Removes home in yoast breadcrumbs
function wpseo_remove_home_breadcrumb($links) {
if ( $links[0]['url'] == home_url('/') ) { array_shift($links); } return $links;
}
add_filter('wpseo_breadcrumb_links', 'wpseo_remove_home_breadcrumb');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment