Support

Account

Home Forums Add-ons Repeater Field Divide up content into child pages

Helping

Divide up content into child pages

  • I am building a page but I have too much data on one page, it is having hard time updating/loading.
    So I am trying to divide up all the ACF repeaters into child pages, so I only have to update certain section of the page, but ACF doesn’t seem to work on childpages.

    Currently this is the structure I have:
    Materials (Parent)
    -General(child page)
    -Safety(child page)

    I need all the data to show on Materials, but just separate the ACF fields onto General and Safety child pages, so every time I update something it doesn’t have to go through all the date, but just the data assigned to child page.

  • When you’re showing the page you will need to get that pages children.

    https://codex.wordpress.org/Function_Reference/get_children

    Then you’ll need to loop though those child pages in a secondary loop and show the fields from the child page.

    ACF will only get fields from the current post id. If you know the ID values of each child page you can then get the field from the child page by including the pages id in the ACF function call.

    $child_page_value = get_field('field_name', $child->ID);

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Divide up content into child pages’ is closed to new replies.