Support » Plugin: Advanced Custom Fields (ACF) » Custom Post Type, Custom Taxonomy CF7 Form — Taxonomy not saved

  • Hiho,

    I built a custom post type with two taxonomies (“umsaetze” and “sortimente”). Both by plugin. Both taxonomies are set in the post type args:

    ‘taxonomies’ => array( ‘sortimente’, ‘umsaetze’ ),

    And the registration of the taxonomies look like this:

    register_taxonomy(‘sortimente’,array(‘phy_shop_offers’), array(
    ‘hierarchical’ => true,
    ‘labels’ => $labels,
    ‘show_ui’ => true,
    ‘show_in_rest’ => true,
    ‘show_admin_column’ => true,
    ‘query_var’ => true,
    ‘rewrite’ => array( ‘slug’ => ‘sortiment’ ),
    ));`

    It’s my first plugin, so I hope this is correct.

    Now:
    I want users to submit their data through a cf7 form and wordpress to create posts of the custom post type when the form is submitted.

    So far everything works like a charm! Everything is stored in the right custom field and I am happy, BUT ONLY:

    I can’t get the data of the two fields “sortimente” and “umsaetze” to fill into the taxonomies. If I map the data to “normal” text custom fields, the data is saved. If I map the two cf7 fields to the two custom taxonomy fields, nothing is saved, the taxonomy stays empty.

    In the field set I activated “Begriffe erstellen” (create terms?), “Begriffe speichern” (safe terms), “Begriffe laden” (load terms) for the taxonomy fields [sorry, I see only the german labels and the fields differ a bit from what is shown at https://www.advancedcustomfields.com/resources/taxonomy/%5D

    I map the cf7 field to taxonomy fields.

    What also irritates me is: when opening on of the created posts I see the two fields in two places: As select fields in the field set plus in the taxonomy boxes in post sidebar:

    https://physalia.de/images/Screenshot_20210428_154332.png

    Both are empty, the fields in the field set and the taxonomy fields in the sidebar. The content of the cf7 form is not inserted.

    Where is my mistake?

    Thanks a lot for your help.

    Best regards
    nici-

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Custom Post Type, Custom Taxonomy CF7 Form — Taxonomy not saved’ is closed to new replies.