mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-04-29 11:32:21 +08:00
9 lines
319 B
Text
9 lines
319 B
Text
// Hide the last crumb if it's a page.
|
|
add_filter( 'aioseo_breadcrumbs_show_current_item', 'aioseo_breadcrumbs_show_current_item', 10, 3 );
|
|
function aioseo_breadcrumbs_show_current_item( $showCurrentItem, $type, $reference ) {
|
|
if ( is_singular( 'page' ) ) {
|
|
$showCurrentItem = false;
|
|
}
|
|
|
|
return $showCurrentItem;
|
|
}
|