I have a few categories with the same name [some of them are sub-categories]. And I want to get an array of ID's for certain cattegory name. I tried this:
$term = get_term_by('name', $cat_name, 'category');
but it seems that
get_term_by() returns only the first term that match the query.