How to tell Custom Breadcrumbs which vocabulary to use? In my site I have pages with a single vocabulary called "category" and Custom Breadcrumbs displays the taxonomy hierarchy and it works.

Another content types has several vocabularies, including "category". But here Custom Breadcrumbs (CB) will not use the category but other vocabulary to generate the trail.

If I exclude the vocabularies I don't want CB to use to only allow "category", then no breadcrumb is displayed.

 

The only difference I see between those content types is the order in which I have created fields. Category was the last field I created for my second content type

So how can I force CB to use category as vocabulary ?
I had the same problem on my site. I managed to fix it the hard way.

Edit custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.inc

Add these lines after line 20:

$query-&gt;condition("v.vid", 2); // 2 is the id of vocab You want to use
$query-&gt;orderBy('v.weight');
$query-&gt;orderBy('t.weight');
$query-&gt;orderBy('t.name');


So You have:

...
$t_alias = $query-&gt;join('taxonomy_term_data', 't', 'r.tid = t.tid');
$v_alias = $query-&gt;join('taxonomy_vocabulary', 'v', 't.vid = v.vid');
$query-&gt;fields( $t_alias );
$query-&gt;condition("r.nid", $node-&gt;nid);
$query-&gt;condition("v.vid", 2);
$query-&gt;orderBy('v.weight');
$query-&gt;orderBy('t.weight');
$query-&gt;orderBy('t.name');
$result = $query-&gt;execute();
$terms[$node-&gt;vid][$key] = array();
...