Custom Fields
Re-Envisioned
Support General No custom post fields for Authors and Editors with Guttenberg Reply To: No custom post fields for Authors and Editors with Guttenberg

#13428

Hi!
We use this code to display fields

[
                'title'      => 'Поля обзоров матчей',
                'post_types' => 'post',
                'include' => array (
                    'category'    => [ self::$category_id ],
                ),
                'fields'     => [
                    [
                        'name'      => 'Состав команды 1',
                        'type'      => 'WYSIWYG',
                        'id'        => 'team_1_players',
                        'options'   => [ 'textarea_rows' => 4,  'teeny'=> true,'media_buttons' => false, 'raw'     => false,],
                    ],
                    [
                        'name'      => 'Состав команды 2',
                        'type'      => 'WYSIWYG',
                        'id'        => 'team_2_players',
                        'options'   => [ 'textarea_rows' => 4,  'teeny'  => true, 'media_buttons' => false, 'raw'     => false,]
                    ],
                    [
                        'name'      => 'Прогноз на матч',
                        'type'      => 'WYSIWYG',
                        'id'        => 'game_result_tip',
                        'options'   => [ 'textarea_rows' => 5,  'teeny'  => true, 'media_buttons' => false, 'raw'     => false,]
                    ],
                    [
                        'name'       => 'Матч',
                        'type'       => 'post',
                        'id'         => 'event_id',
                        'post_type'  => 'event',
                    ],
                ],
            ]