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.

Let's say i have a sample post called "avatar" in "movie", "trailer", "review" and "details" custom post types.

How can i display in the "movie" custom post type the content + links to "trailer", "review" and "details" custom post types ?

share|improve this question

3 Answers 3

Hi @m3tsys:

First, you might find this trac ticket instructive.

That said, the best solution I've found this far is ZigConnect Plugin:

Hope this help.

share|improve this answer

Ideally, you'd want to cast your vote into adding the infamous post2post relationship, which is still missing:

http://core.trac.wordpress.org/ticket/14513

In the meanwhile, the workarounds are three:

  1. Map your posts to specially crafted taxonomies. (slow)
  2. Store relationships in postmeta. (very slow if you ever need to use that in a join statement)
  3. Create your own post2post table.
share|improve this answer
    
Well defined choices. Of course you didn't mention that all three options are a lot of work if custom code is required, and the first has the potential to be very fragile. –  MikeSchinkel Feb 10 '11 at 15:33
1  
I didn't say any of the three was a walk in the park, lol. ;-) –  Denis Feb 10 '11 at 15:46
    
Are there any handy examples on how to create code using those 3 workarounds mentioned above? I'm trying to build a plugin that relates custom post types and am trying really hard to find a solution, given that I cannot use the Posts2Posts plugin within my own plugin. –  drtanz Aug 9 '12 at 16:00

You can create relationships between custom post types with the plugin Sub Posts, price: $ 19.99. With this plugin you're done in minutes, from creating the relationships to displaying them in widgets or shortcodes.

share|improve this answer

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.