Forum Replies Created

Viewing 1 replies (of 1 total)
  • Since we’re having the same issue, I’ll post an example of PHP-registered ACF fields that are not indexed.

    Of course is this an example. Other field types should be also indexed (textarea, wysiwyg, etc).

    Following PHP code is placed in a file and that file is included by functions.php.

    <?php
    
    acf_add_local_field_group([
        'key' => 'group_page_settings',
        'title' => 'Pagina instellingen',
        'fields' => [
            [
                'key' => 'field_custom_title',
                'label' => 'Aangepaste titel',
                'instructions' => 'Gebruik <strong><em>...</em></strong> voor ge&auml;ccentueerde tekst.',
                'name' => 'custom_title',
                'type' => 'text',
            ],[
                'key' => 'field_custom_subtitle',
                'label' => 'Subtitel',
                'name' => 'subtitle',
                'type' => 'text',
            ],
        ],
        'location' => [
            [[
                'param' => 'post_type',
                'operator' => '==',
                'value' => 'page',
            ]],[[
                'param' => 'post_type',
                'operator' => '==',
                'value' => 'post',
            ]],
        ],
        'menu_order' => 10,
        'position' => 'acf_after_title',
        'style' => 'default',
        'label_placement' => 'top',
        'instruction_placement' => 'label',
        'hide_on_screen' => '',
        'active' => 1,
        'description' => '',
    ]);
    
Viewing 1 replies (of 1 total)