Support

Account

Home Forums ACF PRO acf taxonomy from gravity forms

Unread

acf taxonomy from gravity forms

  • Hi,
    I created a portfolio taxonomy with ACF and I’m trying to pass trough a tag field from Gravity Forms to this taxonomy. But isn’t works.

    This is the code:

    add_filter(“gform_post_data”, “custom_taxonomy”, 10, 2);
    function custom_taxonomy($post_data, $form){
    //—————————————–
    //Replace “post_tag” with your taxonomy name
    $custom_taxonomy = “obituarios_localidades”;
    //—————————————-

    $tags = implode(“,”, $post_data[“tags_input”]);
    $post_data[“tax_input”] = array($custom_taxonomy => $tags);
    $post_data[“tags_input”] = null;
    return $post_data;

    And the portfolio categories are: Obituarios
    Localidades

    Can anyone help me please?

    Thanks.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.