ACF:如果用户不是 post 作者,则 the_loop() 中的数据未正确检索

ACF: data not retrieved correctly in the_loop() IF user is not the post author

我有一个循环可以正确检索 post 数据、(标题等)并且只有当查看者是 post 作者时它才能正常使用 ACF 字段,如果查看者它就不起作用是别人... :(

 public static function getFields() {
        $postID = get_the_ID();
        $fields = [];
        $array_anagrafica = [];
        if( have_rows('anagrafica', $postID) ) { // <<- it's not working even with no $postID
            while (have_rows('anagrafica', $postID)) {
                the_row();

                $array_anagrafica['cf'] = get_sub_field('codice_fiscale');
                $array_anagrafica['piva'] = get_sub_field('partita_iva');

有什么提示吗?

这是 acf_form 的问题 -> 使用 acf_form() 和 acf_form_head() 一起复制后端表单,然后可以正确启动。