• Resolved carletto0282

    (@carletto0282)


    Hi there,

    what if I’d like to retrieve related post from a related post to the actual?

    The scenario is this:

    I got a cpt named movies related to a cpt named producers

    In a detail page of a movie I’d like to show “movies from the same producer” that, as I stated above, is like to nest a related query (the one for the movies related to the producer) inside another one (the one that gives me the producer related to the movie I’m looking at).

    The scheme could be:

    -movie page
    – producer X
    – movie1 by producer X
    – movie2 by producer X
    – …

    Thanks guys
    regards
    Carlo

    https://www.ads-software.com/extend/plugins/posts-to-posts/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author scribu

    (@scribu)

    Just call get_related() for each producer.

    Thread Starter carletto0282

    (@carletto0282)

    Ok mate!
    Thanks

    Thread Starter carletto0282

    (@carletto0282)

    I call get_related for each producer but if there are movies produced by both producers I get them doubled per each producer…

    Producer 1
    – movie 1 (produced only by prod1)
    – movie 2 (produced by both)
    – movie 2

    Producer 2
    – movie 2
    – movie 2

    Any suggestion to avoid duplication?
    Thanks

    Carlo

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Posts 2 Posts] Nested related’ is closed to new replies.