I have a custom post type called donation_group
it has a custom_field called donate_pages
which is a repeater field. This donate_pages
has again fields called donation_object
and amount_received
.
I want to access these custom fields in my controller ie php file.
This is the code I have tried so far
$donation_group_posts = Timber::get_posts(array(
'post_type' => 'donation_group'
));
foreach ( $donation_group_posts as $dg_post ) {
$dg_donate_pages = $dg_post -> donate_pages;
echo "dg_donate_pages", $dg_donate_pages;
}
When I echo dg_donate_pages, I am only getting the number of rows that repeater field has. How can I get its values?