Change the Downloads breadcrumb to any other text

Please note: This tutorial is only applicable if you’re running the Easy Digital Downloads Plugin and the Breadcrumbs Box.

You can use the following snippet of code to change the default Downloads text into anything else you like:

add_action('template_redirect', 'custom_breadcrumbs');

function custom_breadcrumbs() {
	global $post, $wp_query;
	if (!empty($post) && !empty($post->post_type) && $post->post_type == 'download') {
		add_filter('thesis_breadcrumbs_second', 'custom_downloads_breadcrumb');
		if (!empty($wp_query) && !empty($wp_query->is_post_type_archive))
			add_filter('thesis_breadcrumbs_trail', 'remove_downloads_breadcrumb_archive');
		else
			add_filter('thesis_breadcrumbs_trail', 'remove_downloads_breadcrumb_single');
	}
}

function custom_downloads_breadcrumb($crumbs) {
	$crumbs['Shop'] = '/shop/';
	return $crumbs;
}

function remove_downloads_breadcrumb_single($crumbs) {
	unset($crumbs[1]);
	return $crumbs;
}

function remove_downloads_breadcrumb_archive($crumbs) {
	unset($crumbs[2]);
	return $crumbs;
}

In the code above, you should replace the highlighted items with the text and destination URL you’d like to use instead of the Downloads/downloads defaults.