// relationship field "Fächer"
// the key of the field "Fächer"
add_filter('acf/fields/relationship/query/key=field_5593ec53f0a0c', 'my_relationship_query', 10, 3);
function my_relationship_query( $args, $field, $post )
// show only pages with this special template
$args['meta_key'] = '_wp_page_template';
$args['meta_value'] = 'page-fach.php';
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users