0

I want to use Custom post type to create object in my website. Object would hold: title, picture, color of the object and identifier (Something similar to "cache" in geocaching.com). Are these parameters created as taxonomy, custom fields or supports?

1
  • Object in which sense ? Sep 17, 2016 at 12:16

2 Answers 2

1

The rule of the thumb is following: term of taxonomy is something group of posts shares, custom field is something individual post has.

Depending on exact context and requirements things might be better saved as one or another. For example group of posts might share general color (term), but if you want each post to have exact unique shade of color then it's better as custom field with that data.

So I would guess your items break down as following:

  • title — native title
  • picture — native post thumbnail or custom field with attachment ID
  • color — might go different ways as above
  • identifier — custom field
2
  • Thanks for answer. One thing I did not understand - I want the custom post type a color so that I could filter them out later. For example create map to display those post and add filter of colours. So I would create red, green and blue taxonomy. But I would also like to add size - small, medium , big. That would give me 6 taxonomies but I want them to be as 2 characters of my custom post type - size and color. How do I group taxonomies in order to distinct them from each other? Sep 18, 2016 at 7:58
  • Red, green, blue will be terms of Color taxonomy. Small, medium, big will be terms of Size taxonomy. So you only need two taxonomies (Color and Size) and each can have as many terms (differens colors and different sizes respectively) in it as necessary.
    – Rarst
    Sep 18, 2016 at 10:25
0

Those would be custom fields. I'd recommend using the Custom Post Type UI plugin, but you can do this manually in functions.php as well.

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .