I have a problem in the homepage of my website.
I have custom post types (scene and movies) and I want to display only scenes in my home and the movie title of the scene. I have defined the relation between those custom posts
The problem is that if I add a filter to my query in order to display scenes like that :
$wp_query = new WP_Query( array( 'post_type' => 'scene' ) );
It will display scenes but the relationship between scenes and movies won’t be established. I tried all the solutions of the documentation () but whitout success.
The relation between scenes and movies works if I set “scenes” AND “movies” in my custom query. But I don’t want the movies displayed in my homepage.
Could you help me please?
- The topic ‘filter custom post type and each_connected’ is closed to new replies.