Home / Admin / Hide the last item in the breadcrumb trail
Duplicate Snippet

Embed Snippet on Your Site

Hide the last item in the breadcrumb trail

This filter can be used to hide the last item in the breadcrumb trail.

<10
Code Preview
php
<?php
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;
}

Comments

Add a Comment