Open thomasjulienalain opened 4 years ago
When you do print_r($theme_options->build());
what is the output?
Array
(
[key] => group_theme_options
[title] => Theme Options
[label] => Options du thème
[style] => seamless
[fields] => Array
(
[0] => Array
(
[type] => accordion
[name] => accordion_1_accordion
[label] => Coordonnées
[key] => field_theme_options__accordion_1_accordion
[open] => 1
)
[1] => Array
(
[type] => textarea
[name] => address
[label] => Adresse postale
[key] => field_theme_options__address
[required] => 1
[new_lines] => br
)
[2] => Array
(
[type] => url
[name] => address_gmap
[label] => Lien Google Map
[key] => field_theme_options__address_gmap
[required] => 1
)
[3] => Array
(
[type] => text
[name] => telephone
[label] => Numéro de téléphone
[key] => field_theme_options__telephone
[required] => 1
)
[4] => Array
(
[type] => email
[name] => email
[label] => Adresse courriel
[key] => field_theme_options__email
[required] => 1
)
[5] => Array
(
[type] => text
[name] => fax
[label] => Numéro de télécopieur
[key] => field_theme_options__fax
[required] => 1
)
[6] => Array
(
[type] => url
[name] => facebook
[label] => Lien facebook
[key] => field_theme_options__facebook
[required] => 1
)
[7] => Array
(
[type] => accordion
[name] => accordion_1_end_accordion
[label] => Accordion 1 End
[key] => field_theme_options__accordion_1_end_accordion
[endpoint] => 1
)
[8] => Array
(
[type] => accordion
[name] => accordion_2_accordion
[label] => Pied de page
[key] => field_theme_options__accordion_2_accordion
)
[9] => Array
(
[type] => text
[name] => telephone_label
[label] => Libellé pour le téléphone
[key] => field_theme_options__telephone_label
[required] => 1
[default_value] => Téléphone
)
[10] => Array
(
[type] => text
[name] => email_label
[label] => Libellé pour le courriel
[key] => field_theme_options__email_label
[required] => 1
[default_value] => Courriel
)
[11] => Array
(
[type] => text
[name] => address_label
[label] => Libellé pour l'adresse postale
[key] => field_theme_options__address_label
[required] => 1
[default_value] => Adresse
)
[12] => Array
(
[type] => text
[name] => fax_label
[label] => Libellé pour le télécopieur
[key] => field_theme_options__fax_label
[required] => 1
[default_value] => Télécopieur
)
[13] => Array
(
[type] => text
[name] => social_label
[label] => Libellé pour les réseaux sociaux
[key] => field_theme_options__social_label
[required] => 1
[default_value] => Nous suivre
)
[14] => Array
(
[type] => textarea
[name] => company_excerpt
[label] => Résumé de l'entreprise
[key] => field_theme_options__company_excerpt
[required] => 1
[new_lines] => br
)
[15] => Array
(
[type] => accordion
[name] => accordion_2_end_accordion
[label] => Accordion 2 End
[key] => field_theme_options__accordion_2_end_accordion
[endpoint] => 1
)
)
[location] => Array
(
[0] => Array
(
[0] => Array
(
[param] => options_page
[operator] => ==
[value] => theme-options
)
)
)
)
@thomasjulienalain Hm I'm not sure, it should be working. If you try with the ACF UI, does it work?
@stevep Yes it's working with ACF UI. It's really weird.
I assume you are doing this, right?
acf_add_local_field_group($theme_options->build());
Recommend closing as this works @stevep.
Hello ! Yes I use acf_add_local_field_group($theme_options->build()); to load the filds. I am using sage theme.
/**
* Initialize ACF Builder
*/
add_action('init', function () {
collect(glob(config('theme.dir').'/app/fields/*.php'))->map(function ($field) {
return require_once($field);
})->map(function ($field) {
if ($field instanceof FieldsBuilder) {
acf_add_local_field_group($field->build());
}
});
});
What I wanted to say is that when I use the ACF plugin in UI mode, the custom group option's title display correctely.
But I still can't make it work with ACF Builder.
Hello !
I created an option page and I want to enable the seamless style. It's not working as expected and still display the metabox.
Seamless is working fine for my other pages, but not for the theme options page. I'm using ACF Builder 1.9 and ACF Pro 5.8.7.