Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am building gaming news and tutorial website. But i don't know how to link multiple post types with one specific post.

For example, i created post types called

Games
News
Tutorials
Videos
Reviews

So the games post type will be basically a list of Games, News will be posts with news, and Tutorials will be tutorials.

But i need to somehow link News and Tutorials to the specific post in Games post type.

Another example

In Games i have made a post with game called Counter Strike.

And when user click on that post he goes to the post and reads basic info of the game i inserted when i made that post.

But i have a menu where i put

News
Tutorials
Videos
Reviews

So when he click on News, the visitor need to have all the posts from news custom post type related to the game from Game post and have them listed all.

Here is a screenshot

this is custom post types

post inside games custom post type

This is a post that i made inside Games custom post type and as you can see its basically a post with informations of the game.

But this menu with news, reviews, guides... when i click on news i need to get somehow a list of all the posts from news, related to counter strike game(post) in Games.

A way to do this?

Custom category or taxonomy and link them?

share|improve this question
    
Never used it but check out wordpress.org/plugins/posts-to-posts. It's well regarded and I think will do what you need. –  mrwweb Jul 16 at 1:57
    
From what i seen on plugin page this might help, ill go and install it and check out what i can do with a plugin. –  Aleksandar Đorđević Jul 16 at 10:22

1 Answer 1

I think your best bet would be to setup categories / sub categories.

Example:

  1. News
    • Counter-Strike
    • StartCraft2

and link them together that way. This will (I believe) especially be much easier when querying your posts, so that you can query from a specific category (ie: Counter-Strike News)

share|improve this answer
    
I was thinking something like that, just other way around. Each game have it's own category and sub category news tutorials etc... just im not sure how would i link that into one post. –  Aleksandar Đorđević Jul 16 at 10:21
    
you're better off dropping the 'games' custom post type, and making each game a 'category'. then you could create custom post types for 'news', 'tutorials', 'reviews', etc...and then assigning the new content / post to a category (game) –  stoopkid1 Jul 17 at 0:25
    
i was thinking about that too stoopkid1 but than i have to make that "game" categori a bit different and fill up with some info like tags, release date, screenshot... which will make it really hard to do if it's category. –  Aleksandar Đorđević Jul 17 at 9:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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