the_category()
only works for the “Category” taxonomy which doesn’t appear to be hooked to your custom post type. I see you’re registering a custom taxonomy. If you want to show the terms from that taxonomy that are assigned to the post, you’ll need to use the_terms()
or get_the_terms()
:
the_terms( $post->ID, 'fgaleri', '', ', ', '' );