WordPress add custom feilds in Post Category

Solution 1: Add code

Inside your themes directory funcitons.php , add code below

add_action ( 'category_edit_form_fields', function( $tag ){
    $cat_prod_left = get_term_meta( $tag->term_id, '_cat_prod_left', true ); ?>
    
        
        
            
            

term_id, '_cat_prod_right', true ); ?>

Screenshot

Solution 2: Advanced Custom Field

Image credit: Photo by Launchpresso on Unsplash