• I have a relationship field and want to list all post(types).
    So I have not selected anything in the Post Types subfield.
    I expect that I can choose from all available public posts but instead I can only select the post from the CFS post type.

    Would it be more logic to show all posts instead of the CFS posts?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Matt Gibbs

    (@mgibbs189)

    There’s a hook in fields/relationship.php to let you control which posts appear. I think it shows published posts by default.

    Search for the cfs_field_relationship_query_args hook

    Thread Starter Stefan van den Dungen Gronovius

    (@dungengronovius)

    Hi Matt,

    Found the hook, but I think the fallback is not correct.
    The default fallback you use now is as follows:
    $post_types = get_post_types( array( 'exclude_from_search' => true ) );

    I think it must be the exact opposite 😉

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Relation field Limit Post Types default does not work as expected’ is closed to new replies.