Forum Replies Created
-
AuthorPosts
-
Quang AnhMemberHi Deon,
You should try something like this, it work for me !
$term_ids = get_post_meta($post_id, 'restaurant_cuisine', false); // Get the term IDs foreach ($term_ids as $term_id) { echo $term_id; $term_info = get_term_by('id', $term_id, 'cuisine'); echo $term_info->name; }I think that the way you want, taxonomy store in post_meta, and you must extract to get that informations.
Quang AnhMemberHi Steve,
I find your solution here: https://piklist.com/support/topic/my-field-is-not-saved/
Thanks./.
Quang AnhMemberHi Steve,
I have the same problems with taxonomy.
functions.php
add_filter('piklist_taxonomies', 'restaurant_cuisine'); function restaurant_cuisine($taxonomies) { $taxonomies[] = array( 'post_type' => 'restaurant' ,'name' => 'cuisine' ,'show_admin_column' => true ,'configuration' => array( 'hierarchical' => true ,'labels' => piklist('taxonomy_labels', 'Cuisines') ,'hide_meta_box' => true ,'show_ui' => true ,'query_var' => true ,'rewrite' => array( 'slug' => 'cuisine' ) ) ); return $taxonomies; }restaurant_metabox.php
piklist('field', array( 'type' => 'select' ,'scope' => 'taxonomy' ,'field' => 'restaurant_cuisine' ,'label' => 'Cuisine' ,'description' => 'Choose the Cuisine taxonomy.' ,'attributes' => array( 'multiple' => 'multiple' ) ,'choices' => $choices ));And I find a trick in that topics.
https://piklist.com/support/topic/warning-illegal-offset-type-in-isset-or-empty/When I removing scope it work. But the problem here is it do not effect the list taxonomies you choose. It store data in a different way not the ways you choose taxomony for your post and using with get_the_terms() function to get data. Can you help me find a solution.
Thanks
Quang AnhMemberGoing with Piklist for 3 days and I think it is a good solution to solve management application. Will have something to show.
P/s: How can I change my avatar. Can not find it in update profile and when I check in to Badges nothing happened!
Quang AnhMemberThanks Steve for quick reply! Everythings okay now.
-
AuthorPosts