0

i have been researching much about taxonomies and usermeta. So taxonomies are to categorize things up for posts (animals, plants..). That makes it easier to search posts through them.

Now here is my question: I want to add custom user fields like gender, university, age etc..

Should i define them as usermeta, taxonomy (categories: gender->male,female) or custom taxonomy?

At the end i will have a overview of all existing users to search them by gender, university etc. Also the admin can always add a new university for example.

So which way is the most common?

I hope you guys can help me out for my decision.

Thanks in advance

  • Why not usermeta? "custom profile fields", profile = user. "all existing users to search them" – kero Aug 11 '17 at 15:14
  • because for usermeta the university is always been saved for each user. for example i have university 1 and university 2 and every user has an entry university 1 or university 2. so wouldnt it cost unnecessary amount of disc space doing so? – Azrion Aug 11 '17 at 15:28
0

Personally, I would recommend creating a custom taxonomy for gender so each category is specific.

It will get more difficult to go through all of the categories. Breaking them down into several custom taxonomies will help you keep clean.

It all comes down to how you would like your website to be structured.

  • yeah i thought about that too – Azrion Aug 13 '17 at 12:01
0

If it is an information about a user (probably displayed on on profile pages, or other user centric places), use user meta.

If it is a way to have a collection of users..... hmmm wordpress sucks in this. Best option is probably to add a relevant role.

Taxonomies in general are geared toward creating collection of content, and users are just not content, therefor while you can force some DB model that will let you use taxonomies, this is not going to be fun at all.

  • oh dear. why are such simple things like gender are not set as default in wp. anyways thank you much for your advice – Azrion Aug 13 '17 at 12:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.