I have just found the solution.
I just miss to put a taxonomy name.
$cat = get_term_by( 'name', $cat_name, 'city' );
this works fine!
Thanks,
I have just found the solution.
I just miss to put a taxonomy name.
$cat = get_term_by( 'name', $cat_name, 'city' );
this works fine!
Thanks,