I created a custom post type called Game, and created 3 posts under it, Game A, Game B and Game B.

I also want to create more posts, like guides and tutorials, for Game A, is thre a way to group these posts under Game A? I can create a tag called Game A, and group the posts under it. but then I will have duplicate tag and a post for custom post type.

Right now, the only ways (that I know) to group posts are by tag and category. I am clueless when it comes to grouping posts for a post created with a custom post type.

Thank you.


Solution 1.

As you've already mentioned, you can use terms, but - it will cause some redundancy, because for every post you'll have to create a term. And you'll have to maintain this post-term connection later on.

Solution 2.

On the other hand, you can use Custom Fields. So for every Guide and Tutorial you can add Custom Field like "related_game_id" and store the ID of related game in that field.

You can use Advanced Custom Fields and its Relation field to make some nicer interface for editing these relations.

Solution 3.

But there is one more way of achieving this. You can remove CPT Game and add Custom Taxonomy Game.

Then you can add this taxonomy to Guides, Tutorials, and all other post types and use description of a term to edit Game info.

  • I like option #3, but not sure how I can group multiple posts under this Custom Taxonomy Game. I been thinking about option #2, instead of using Advanced Custom Fields, I will create some tables, so it is faster and efficient. – Noob Coder Mar 4 at 22:53

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.