0

This is my code:

$configuracoes = register_post_type( 'configuracoes', $args );

$configuracoes->add_meta_box(
    'dados',
    'Personalize os dados de impressão',
    array(
        'tabs',
        array(
            'Dados Pessoais' => array(
                array(
                        'name' => 'Série',
                        'label'=> 'Série',
                        'type' => 'text',
                        'underscore' => false
                    )
                ),
            'Dados Profissionais' => array(
                array(
                        'name' => 'Tempo de Profissão',
                        'label'=> 'Tempo de Profissão',
                        'type' => 'text',
                        'underscore' => false
                    ),
                )
        )
    )

This code generates this form: enter image description here

How can I put in place of the input, a text box similar to the one on the page to add a new blog post for example?

2
  • 1
    Are you using a metabox plugin? The code in your question should not be possible in standard WordPress, register_post_type returns a WP_Post_Type object, and that object does not have an add_meta_box method. Additionally, WordPress does not have a fields and tabs API, metaboxes have to construct the HTML of their output in PHP – Tom J Nowell Oct 29 '20 at 21:55
  • I'm just maintaining the system. I found out that the creator used this library github.com/gizburdt/cuztom thank you very much for your answer, it already gave me a more objective way! – Alisson Custodio Oct 29 '20 at 23:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.