Skip to content

Instantly share code, notes, and snippets.

@WPVNdev
Created June 17, 2021 08:34
Show Gist options
  • Save WPVNdev/f07c9bf2ce3033ebd6b3411f1f49f959 to your computer and use it in GitHub Desktop.
Save WPVNdev/f07c9bf2ce3033ebd6b3411f1f49f959 to your computer and use it in GitHub Desktop.
Loại bỏ breadcrumb_last ra khỏi breadcrumbs của Yoast SEO
<?php
// Loại bỏ breadcrumb_last ra khỏi breadcrumbs của Yoast SEO
function removeLastBreadcrumb($link) {
if( strpos( $link, 'breadcrumb_last' ) !== false ) {
$link = '';
}
return $link;
}
add_filter('wpseo_breadcrumb_single_link', 'removeLastBreadcrumb');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment