First, you are mixing up terminology a bit. Portfolio is taxonomy
, but Work, Images, etc are terms
(not categories
).
So you need to adjust functions for your taxonomy. Try this:
Replace:
$catid = get_cat_id('Images');
Becomes:
$catid = get_term_by( 'name', 'Images', 'portfolio' );
$catid = $catid->term_id;
And:
$categories = get_categories('child_of=".$catid."&orderby=name');
Becomes:
$categories = get_categories('child_of=".$catid."&orderby=name&taxonomy=portfolio');