Custom Taxonomy (non hierarchical) e.g tags
Author | Posts |
---|---|
May 20, 2013 at 10:11 am 3864 | |
cob-web | The one thing i am really missing is a proper field for custom taxonomies which operate as tags (created as a non hierarchical taxonomy) Currently you can select the custom taxonomy (setup as tags not category) as a field, but the only problem is that it treats it like a category. you can't select a normal text box. my custom taxonomy tags (let's call it business_tags) i would like to enter as tags (comma separated) I don't want to select them like categories as currently is the case. I can use the default post_tags field, but I don't want to mix them so there should be an extra option in that field type. currently it is dropdown,multiselect or checkbox. there should be an option textbox or something like that. |
May 20, 2013 at 7:37 pm 3883 | |
Tareq Hasan | Okay, I’m giving you the solution. [php] if ( $post_id ) { $value = implode( ‘, ‘, $tagsarray ); add_action( ‘wpufe_bus_tags’, ‘wpufe_render_bus_tags’, 10, 3 ); function wpufe_inesrt_business_tags( $post_id ) { add_action( ‘wpuf_add_post_after_insert’, ‘wpufe_inesrt_business_tags’ ); This code adds a input field named Business Tags. You’ve to create a action hook field and give the label |
May 21, 2013 at 4:58 am 3906 | |
kolhoffmmm | Thanks Tareq I will try it out |
May 21, 2013 at 11:15 am 3920 | |
kolhoffmmm | Thanks it is working great |
June 7, 2013 at 4:51 am 4633 | |
sungkhum | I also needed this feature and used the code you suggested. How would I make this action hook a required element in the form? I want to require the user to fill it out. Thanks, |
July 17, 2013 at 9:32 am 6055 | |
seldomstatic | This solution works great. How can I make the custom taxonomy form field required? |
July 17, 2013 at 2:38 pm 6062 | |
Tareq Hasan | The plugin now already supports non hierarchical taxonomy, so you don’t need this modification. |
July 17, 2013 at 7:36 pm 6071 | |
seldomstatic | I’m using this action hook to allow users to add “custom” taxonomy tags such as genre, artist, year, etc. The hook works perfectly. I just want to know how I can make the form field a required value. |
July 17, 2013 at 8:09 pm 6073 | |
Tareq Hasan | If you change the Type to Text Input, users can input taxonomy. Although, you can add attributes to your input |
July 26, 2013 at 11:02 pm 6352 | |
cob-web | Hey Tareg, |
July 26, 2013 at 11:18 pm 6354 | |
Tareq Hasan | Auto completion doesn’t yet work in the frontend. But the feature will come eventually in the future 🙂 |
July 26, 2013 at 11:50 pm 6355 | |
cob-web | Thanks Tareq for your super fast answer! |