As in the picture, the taxonomy terms are showing count of nodes tagged with the term( using taxonomy_menu module). That nodes are of type classified ads.
Is it possible to filter out expired ads ? I mean in the picture, the first menu item is "10th" with 24 nodes in it. But I want to filter out 5 nodes which have expired containing a hidden flag that it has expired. So that is should show as "10th(19)"
How can I do it?
Looks like in the file taxonomy_menu.database.inc we have this function:
function _taxonomy_menu_term_count($tid) {
$result = db_select('taxonomy_index', 'tn');
$result->condition('tid', $tid);
$result->join('node', 'n', 'n.nid = tn.nid AND n.status = 1');
$result->addExpression('COUNT(n.nid)', 'term_count');
$temp = $result->execute();
$temp = $temp->fetchObject();
return $temp->term_count;
}
Along with n.status I should add n.field_expired check to exclude I think. I wouldn't mind to temporarily hack the code of Taxonomy Menu though.