Support » Plugin: Post My CF7 Form » Default post categories

  • Resolved onliniak

    (@onliniak)


    Another category problem …

    1. I create new CF7 form.
    2. I have something like
    <label>Select category of post</label>
    [radio category default:1 “category1” “category2” “category3” “category 4”]
    3. Select Post Categories (blue) and category [radio] in taxonomy.
    4. Save
    5. Send example post.
    6. New post has not category.

Viewing 3 replies - 1 through 3 (of 3 total)
  • OK … I am try another way.

    1. New form.
    2. Empty checkbox [checkbox checkbox-362].
    3. Taxonomies → WordPress default categories.
    4. Refresh permalinks.
    5. Display form … with empty checkbox.
    5.5. Strange … it works only with custom post, when I change to exiting post taxonomy is broken. They change to empty category with slug category.

    So I have simple question → how can I map checkbox/radio/select to WordPress categories like in every guest post plugin ?

    Stupid question → I try map manually cats with id 2,3,4 and slugs category1, category2, category3. Hook option give me cf7_2_post_filter-category :

    add_filter(‘cf7_2_post_filter-category’,’filter_category’,10,3);
    function filter_category($value, $post_id, $form_data){
    $value = array((2),(3),(4)); // My IDs
    $post_id = 1207; // Post ID
    $form_data = array( //’radio name’ => ID
    ‘category’ => 2,
    ‘category2’ => 3,
    ‘category3’ => 4,);
    };

    Question → How I can select category ID ?

    It’s me again,

    I have the stupidest answer in the world. I chose the empty select option and wanted to map the WordPress categories (default), but the plug did not show anything. It turned out that CSP’s policy was guilty, or rather my misunderstanding of the plugin’s operation. I thought that, just like my own field, the connection will come from backfront, and it turns out that the categories are mapped live by a javascript.

    So, sorry from problem and I have feature request → if possible move category mapping to backend by cron or something similar. If not possible or very specific, I understand.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Default post categories’ is closed to new replies.