Posts 2 Posts
problem with get related (1 post)

  1. skapiso
    Posted 3 years 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


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Posts 2 Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic