theme development - See double taxonomy inputs in WP editor

admin2025-06-05  3

I registered 3 taxonomies for a custom post type, but they show up in 2 places when editing a custom post type.

I would like to only display the input boxes on the right of the editor. How to remove the drop down input under my custom fields?

3x input under the custom field AND on the right:

When I remove my registration code from functions.php, and refresh this is the result:

My registration code from functions.php:

function ledensubsector_init() {
    register_taxonomy(
        'subsector',
        'leden',
        array(
            'label' => __( 'Sub-sector' )
        )
    );
}
add_action( 'init', 'ledensubsector_init' );

function ledensupplychain_init() {
    register_taxonomy(
        'supplychain',
        'leden',
        array(
            'label' => __( 'Supply chain' )
        )
    );
}
add_action( 'init', 'ledensupplychain_init' );

function ledentechnology_init() {
    register_taxonomy(
        'technology',
        'leden',
        array(
            'label' => __( 'Technology' )
        )
    );
}
add_action( 'init', 'ledentechnology_init' );

I registered 3 taxonomies for a custom post type, but they show up in 2 places when editing a custom post type.

I would like to only display the input boxes on the right of the editor. How to remove the drop down input under my custom fields?

3x input under the custom field AND on the right:

When I remove my registration code from functions.php, and refresh this is the result:

My registration code from functions.php:

function ledensubsector_init() {
    register_taxonomy(
        'subsector',
        'leden',
        array(
            'label' => __( 'Sub-sector' )
        )
    );
}
add_action( 'init', 'ledensubsector_init' );

function ledensupplychain_init() {
    register_taxonomy(
        'supplychain',
        'leden',
        array(
            'label' => __( 'Supply chain' )
        )
    );
}
add_action( 'init', 'ledensupplychain_init' );

function ledentechnology_init() {
    register_taxonomy(
        'technology',
        'leden',
        array(
            'label' => __( 'Technology' )
        )
    );
}
add_action( 'init', 'ledentechnology_init' );
Share Improve this question asked Dec 18, 2018 at 11:08 LudoLudo 612 silver badges11 bronze badges 2
  • Have you added custom fields for them with ACF? Looks like you have. You won’t need those. WordPress adds them for you. – Jacob Peattie Commented Dec 18, 2018 at 11:16
  • Indeed, I did that with ACF- totally forgot it. I'll just have to remove it. Thanks! – Ludo Commented Dec 18, 2018 at 11:19
Add a comment  | 

1 Answer 1

Reset to default 0

WP adds the inputs automatically. I forgot that I added the inputs for the taxonomies also with AFC. So I just had to remove them from my custom fields.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1749088204a316262.html

最新回复(0)