mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-05-02 12:02:25 +08:00
12 lines
330 B
Text
12 lines
330 B
Text
add_filter( 'wpseo_breadcrumb_single_link', 'wpseo_remove_breadcrumb_link', 10 ,2);
|
|
function wpseo_remove_breadcrumb_link( $link_output , $links ){
|
|
$page_src = $links['url'];
|
|
$last_word = basename( $page_src );
|
|
$text_to_remove = 'shop';
|
|
|
|
if( $last_word == $text_to_remove ) {
|
|
$link_output = '';
|
|
}
|
|
|
|
return $link_output;
|
|
}
|