Single page archive – get coresponding taxonomy and terms

Nvm i got it working with

has_term

So the code is…

$data = [];
foreach($months as $key => $val) :
    $data[$key][$val] = [];
foreach($parts as $part) {

    if( has_term( $part, $key ) ) {
        array_push($data[$key][$val], $part);
    }   
}
endforeach;

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)