Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Like the title states I'm trying to add a URL field to taxamony.

function create_post_type() {  
register_post_type( 'brands',  
    array(  
        'labels' => array(  
            'name' => __( 'Brands' ),  
            'singular_name' => __( 'Brands' )  
        ),  
    'public' => true,  
    'menu_position' => 5,  
    'supports' => array('title', 'editor', 'thumbnail'),
    'rewrite' => array('slug' => 'brands')  
    )  
);  
} 

add_action( 'init', 'create_post_type' ); 

function partner_taxonomy() {  
   register_taxonomy(  
    'partners',  
    'brands',  
    array(  
        'hierarchical' => true,  
        'label' => 'Partners',  
        'query_var' => true,  
        'show_ui' => true,
        'rewrite' => array('slug' => 'partners')  
    )  
);  
}  
add_action( 'init', 'partner_taxonomy' );

From here how do I add an URL field to "Partners" taxonomy? Also code to be added to the taxonomy.php page for display.

Thanks

share|improve this question
add comment

1 Answer

Never done it through direct coding. I use Advanced Custom Fields for this.

Any type of custom field can be shown there, text, image, checbox, etc.
And you have to set the location rule to be the Taxonomy screen.

acf taxonomy rule

Category screen with custom fields:

custom fields in category

Documentation on how to retrieve the data.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.