• CouleurCitron

    (@couleurcitron)


    When I saved my relations, I can’t modify it (no relations displayed).

    there’s an error in the cptr-metaboxes.php file

    $posts_args = array(
    ‘post_type’ => ‘any’,
    ‘include’ => $allPostsIDs,
    ‘posts_per_page’ => -1,
    );

    $cpt_related_posts = get_posts($posts_args);

    has to be :

    $posts_args = array(
    ‘post_type’ => get_post_types(),
    ‘include’ => $allPostsIDs,
    ‘posts_per_page’ => -1,
    );

    $cpt_related_posts = get_posts($posts_args);

    It works perfectly after that!

    https://ww.wp.xz.cn/plugins/custom-post-type-relations/

The topic ‘There's a problem after saving relations’ is closed to new replies.