Skip to content

Rendering components only in the _document.twig template #367

Answered by timohubois
Auroraboreali-s asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Auroraboreali-s, I solve such as requirements by creating a static component field group at the required pages inside the admin area. Inside the component functions.php you can use the ACFComposer to create a new fieldGroup.

Example:

use ACFComposer\ACFComposer;

add_action('Flynt/afterRegisterComponents', function () {

    ACFComposer::registerFieldGroup([
        'name' => 'optionsBreadcrumb',
        'title' => 'Breadcrumb Options',
        'style' => 'default',
        'menu_order' => 0,
        'fields' => [
            [
                'label' => '',
                'name' => 'pageOptionBreadcrumb',
                'type' => 'group',
                'layout' => 'row',
        …

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by Auroraboreali-s
Comment options

You must be logged in to vote
4 replies
@timohubois
Comment options

@Auroraboreali-s
Comment options

@timohubois
Comment options

@Auroraboreali-s
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants