Custom Fields
Re-Envisioned
Support General Field Type Taxonomy – Twice taxonomy field bug

This topic contains 1 reply, has 2 voices, and was last updated by  Anh Tran 11 months, 1 week ago.

  • Creator
    Topic
  • #12597

    Charlin
    Participant

    Hi,

    I need to add two same taxonomy field. They have different id but it’s the same field.

    array(
              'name'             => __( 'Catégorie', 'omnivit' ),
              'id'               => "_category",
              'type'             => 'taxonomy',
              'taxonomy'         => 'product_category',
              'field_type'       => 'select_tree'
            ),
    array(
              'name'        => 'Suggestion Catégorie',
              'id'          => "_similar_category",
              'type'        => 'taxonomy',
              'taxonomy'   => 'product_category',
              'field_type'  => 'select',
            ),

    The first is for attribute category to the post, the second is for attribute a second category to make a suggestion on the front.

    If I change the second, the first take the same value.

    Any clue ?

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #12624

    Anh Tran
    Keymaster

    Hi Charlin,

    You don’t need 2 taxonomy fields. One field is enough, because it’s used to set post terms. It doesn’t store values in custom fields.

    If you want to use 2 taxonomy fields, and save values in custom fields, please use taxonomy_advanced instead.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.