Change breadcrumb items programatically

In some cases, you might want to forcefully change the breadcrumb items via code, to make them behave just the way you want them to. A simple example snippet is available below and it should let you modify where the breadcrumb items link to, and how they’re displayed.

add_filter(
	'blocksy:breadcrumbs:items-array',
	function ($items) {
		if (is_single()) {
			$items[1]['url'] = 'https://url-to-blog.com';
			$items[1]['name'] = __('Blog', 'blocksy');
			$items[2]['name'] = get_the_title();
			return $items;
		}
		return $items;
	}
);
Not the solution you are looking for?

Please check other articles or open a support ticket.