What do you mean by “only returning the term id”? Can you make a few screenshots how the results look like currently?
Are there any error messages visible by any chance?
I have no idea where the problem is, the code looks fine to me. There must be something I’m not noticing.Best,
If you like my products, don't forget to rate them on codecanyon :)