Try using get_the_terms()
instead of get_the_category()
. The latter is for the default “category” taxonomy only, not custom taxonomies you register yourself. See developer.wordpress.org/reference/functions/get_the_terms
Try using get_the_terms()
instead of get_the_category()
. The latter is for the default “category” taxonomy only, not custom taxonomies you register yourself. See developer.wordpress.org/reference/functions/get_the_terms