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.
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.
Share Improve this question asked Jan 6, 2019 at 22:59 Noob CoderNoob Coder 1691 silver badge8 bronze badges1 Answer
Reset to default 1Solution 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.