• Resolved kwiz13

    (@kwiz13)


    sorry for my english, to expose my problem, I am currently using the plugin Dynamic Select for Contact Form 7, I can thus retrieve through a function the list of my categories in a select.

    function cf7_dynamic_select () {
    
    $ output = array ('- - -' => '0');
    ???? $ args = array (
    ?????? 'order' => 'ASC',
    ?????? 'orderby' => 'name',
    ?????? 'hide_empty' => 0);
    ???? $ categories = get_categories ($ args);
    ???? foreach ($ categories as $ category) {
    ???????? $ output [$ category-> name] = $ category-> name;
    ???? }
    ???? return $ output;
    }
    add_filter ('listecategories', 'cf7_dynamic_select', 10, 2);

    My objective is to create a new article with a category according to the choice of the user’s select option.
    but in the “Custom Taxonomy” part of your plugin you do not offer my select fields.

    help please ??

Viewing 1 replies (of 1 total)
  • Plugin Author Aurovrata Venet

    (@aurovrata)

    you do not need to use the Dynamic Select for Contact Form 7 to do this.

    simply create a std drop-down menu tag in your cf7 form. Map this field to your taxonomy. The plugin will automatically populate the select field with the taxonomy terms which when selected by your user, will be assigned to the created post.

Viewing 1 replies (of 1 total)
  • The topic ‘how to create posts with select dropdown dynamic category’ is closed to new replies.