How to display Resume Category List for MultiSelect
-
I have a resume form where I want to display the Resume category [/wp-admin/edit-tags.php?taxonomy=resume_category&post_type=resume]
Currently I am doing by using below function in theme’s function.php
$fields['resume_fields']['select_expertise'] = array( 'label' => __( 'Your Expertise<span class="error">*</span>', 'job_manager' ), 'type' => 'multiselect', 'required' => false, 'options' => array( 'Resume Category 1'=>'Resume Category 1', 'Resume Category 2'=>'Resume Category 2', 'Resume Category 3'=>'Resume Category 3', 'Other Resume Category'=>'Other Resume Category' ), 'description' => '*For multi-select, hold the CTRL key and click the items for your expertise', 'priority' => 10 );
But this is something HARDCODED Stuff.
How to fetch Resume Category created under WordPress admin so that the user can select on resume submission processI want like below :
$fields['resume_fields']['select_expertise'] = array( 'label' => __( 'Your Expertise<span class="error">*</span>', 'job_manager' ), 'type' => 'multiselect', 'required' => false, 'options' => array(wp_list_categories( array( 'orderby' => 'name', 'taxonomy'=> 'resume_category', ) )), 'description' => '*For multi-select, hold the CTRL key and click the items for your expertise', 'priority' => 10 );
I tried below also but didn’t worked:
$select_cats = wp_dropdown_categories( array( 'echo' => 0,'taxonomy'=> 'resume_category' ) ); $select_cats = str_replace( "name='cat' id=", "name='cat[]' multiple='multiple' id=", $select_cats ); // echo $select_cats; $fields['resume_fields']['select_expertise'] = array( 'label' => __( 'Your Expertise<span class="error">*</span>', 'job_manager' ), 'type' => 'multiselect', 'required' => false, 'options' => array( $select_cats), 'description' => '*For multi-select, hold the CTRL key and click the items for your expertise', 'priority' => 10 );
Please help guide.
Best regards.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to display Resume Category List for MultiSelect’ is closed to new replies.