I creating a real estate platform where allow users to add their listing. The users are people who may not know how to using wp platform, so I make it as easy as possible for them to make a post. Thanks for the custom post type, I manage to create a post type that specifically for add listing. In this post type, there are many custom fields to store the necessary information like location, property type and etc...

Since I make it simple to use, so I didn't use the categories to sort the posts. However, what I like to do is let the custom field values as the taxonomies. For example:

[States] <- this is custom field in select/radio type

  • [state 1] <- this is custom field value option for states
  • [state 2] <- this is custom field value option for states
  • [state 3] <- this is custom field value option for states
  • [state 4] <- this is custom field value option for states
  • [etc...] <- this is custom field value option for states

So I want to sort the posts according to the value in State that user selected. My idea is to make each of the value [[state 1],[state 2],[state 3]...] to be the categories. When the user select the option, it will automatically become the categories of the post. Possible to do this?

  • Close-voted as too localized. You're basically asking, "how can I use a custom field as a custom taxonomy, because I don't want to use custom taxonomies?" Dec 2, 2012 at 15:19

2 Answers 2


Yes you can, WP has a build in function to attach a custom taxonomy to a (custom) posttype: http://codex.wordpress.org/Function_Reference/register_taxonomy

  • Nope, what I know is register_taxonomy is insert the taxonomy in writing panel then let the user to tick or select. What I want is assign the custom meta values (from custom field) become the taxonomies. Not create a new taxonomy panel.
    – dev-jim
    May 7, 2012 at 16:12
  • Why does it have to be a custom field? A taxonomy is looks perfect for this.
    – janw
    May 8, 2012 at 7:17
  • Well, I using the custom field at the first place, so it would be easier if stick with it. If there are no other wyas to make it, then I will change to taxonomy eventually. Anyway,thanks for your advice.
    – dev-jim
    May 8, 2012 at 12:23
  • Maybe the problem with a taxonomy is that the user is able to "Add new" and there's the "Most used" feature...
    – brasofilo
    Oct 31, 2012 at 17:44

One possible option (don't think I fully understand) is to use Advanced Custom Fields with their Category add-on field (which would allow you to save the categories as a custom field AND as the actual taxonomy for the post - still don't completely understand the use-case, but that would seem to fit your requirements.

  • There is no options to add new term for ACF category addon. If field type is taxanomy, you can not add new values for that, like it is on defoult wordpress taxanomy block. I also need this function.
    – Foxsk8
    Jan 21, 2014 at 21:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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