문제

Let's say we create an IMDB like website.

So (for example) we can have two types of custom post types:

  • movies
  • actors

We would like to see in each movie page all of it's actors. And in each actors page all of the movies he played in.

Can this cross linking be done using custom post types?

If not, is it expected to be possible in the future?

If not, is there an alternative (in WP) for doing this?

Thanks

도움이 되었습니까?

해결책

Checkout scribu's post2post plugin, it should fill your needs.

다른 팁

Next to the pages for Movies and Actors just define two taxonomies: Actors and Movies. Then you can categorize each Movie with a Movie from the Movies Taxonomy and you can categorize each Actor from the Actor Category.

On the other end you categorize each Movie with any Actor from the Actors taxonomy.

If you then can query a taxonomy to list pages that are part of a specific category (which should be possible) then you have already cross-linked everything as wished with wordpress data-structures.

On the [Movie Page] get that Movies Page [Authors] from the [Authors Taxonomy]. Then query the [Authors Taxonomy] for [Author Pages] that have the specific [Author] from the [Authors Taxonomy] attached.

On the [Author Page] you can do it the other way round.

I'm not that firm with Taxonomies but it might be the case that you need to register them per custom post type. This can make some data redundant which generally makes content management more intense.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 wordpress.stackexchange
scroll top