tybruffy / ACF-Reusable-Field-Group

Advanced Custom Fields Plugin to reuse Field Groups
54 stars 15 forks source link

Accessing Field Group and methods do not work on it #8

Open adevapp opened 9 years ago

adevapp commented 9 years ago

When accessing the field group, it returns as an array where the methods do not work on it. As such, the template I pass the data too must use an array to access the data. I would prefer to use it get_field, etc on the inner fields.

        $x = get_field_object('content_with_right_sidebar');

            foreach ($x as $y) {

                    foreach ($y as $k) {

                    $layout = $k["acf_fc_layout"]; // Layout check here

                    $post = $k;
                    setup_postdata($post);

                    $viewData = array('post' => $post);

                    ThemeController::loadView('templates/row-thumbnails-with-links', $viewData);

                    wp_reset_postdata();

            }
        }
tybruffy commented 9 years ago

I'd love a pul request for this, but as is I don't have the time to focus on this. This would presumably help alleviate some issues with using it inside repeater fields as well, but at this point I am just unable to find time to work on this