That was it. Thank you! Just need to add the new drop-downs.
I’ve labelled the repeater ID as ‘master_content_type’
And referenced it in the content php file.
<?php if (have_rows('master_content_type')) : ?>
<section id="truffles_contentWrapper" class="truffles_contentType truffles_content">
<?php while (have_rows('master_content_type')) : the_row();
// Available Variables under sub field 'select'
I also tried to register a new field in the functions.php file.
acf_add_local_field_group( array(
'key' => 'group_649377b3715ff',
'title' => 'Master Page Builder',
'fields' => array(
array(
'key' => 'field_649377b3bddda',
'label' => 'Master Content Type',
'name' => 'master_content_type',
'aria-label' => '',
'type' => 'repeater',
Should I be modifying something else? Or registering the new field with JSON?
Should I change it to ‘content_type’ then, like the advanced custom layout?
I have the repeater ID labelled ‘master_content_type’
and then referenced in the content file:
<?php if (have_rows('master_content_type')) : ?>
<section id="truffles_contentWrapper" class="truffles_contentType truffles_content">
<?php while (have_rows('master_content_type')) : the_row();
// Available Variables under sub field 'select'
There’s also this code in the functions.php
add_action( 'acf/include_fields', function() {
if ( ! function_exists( 'acf_add_local_field_group' ) ) {
return;
}
acf_add_local_field_group( array(
'key' => 'group_649377b3715ff',
'title' => 'Master Page Builder',
'fields' => array(
array(
'key' => 'field_649377b3bddda',
'label' => 'Master Content Type',
'name' => 'master_content_type',
'aria-label' => '',
'type' => 'repeater',
Should I use JSON to register new fields?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.