I have a site that has the following format:
Parent Page (Want to display all child repeaters)
|
|___Child Page (Has repeater field)
|
|___Child Page (Has repeater field)
|
|___Child Page (Has repeater field)
As you can see, I want to display all of the child repeaters (which are the same kind) on the parent page.
I am guessing that I need to collect all of the child ids in an array and then plop it where $page_id is in the code below, but not sure how to go about doing that. How can I accomplish this, or is there a different/better way to do it?
<?php
global $post;
$page_id = get_queried_object_id();
if( have_rows('faq_section', $page_id) ): ?>
<?php while( have_rows('faq_section', $page_id) ): the_row(); ?>
----Repeater Stuff----
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
<?php endif; ?>