WordPress.org

Ready to get started?Download WordPress

Forums

Posts 2 Posts
problem with get related (1 post)

  1. skapiso
    Member
    Posted 1 year ago #

    Hello everyone!!

    I have "movies" linked with "scenes"

    In my scene page, i want to display all other scenes of this movie.

    So I used the get_related method

    $related = p2p_type( 'movie2scene' )->get_related( get_queried_object() );

    It works well if my scene is linked to a movie but if I am on a scene page which is not linked to a movie, the function get_related displays others scene from other movie, without any distinction....

    Could someone help me about it?

    thank you for your help

    http://wordpress.org/extend/plugins/posts-to-posts/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic