00 Days
00 Hours
00 Minutes
00 Seconds

Black Friday sale - up to 40% OFF

Grab this offer now

Documentation

Everything you need to get started with Blocksy Theme and Companion

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.