Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: My field is not saved #3796
    Quang Anh
    Member

    Hi 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.

    in reply to: Taxonomy field not saving on CPT #3781
    Quang Anh
    Member

    Hi Steve,

    I find your solution here: https://piklist.com/support/topic/my-field-is-not-saved/

    Thanks./.

    in reply to: Taxonomy field not saving on CPT #3780
    Quang Anh
    Member

    Hi 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

    in reply to: [Custom Post Type] New column data doesn't display #3777
    Quang Anh
    Member

    Going 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!

    in reply to: [Custom Post Type] New column data doesn't display #3776
    Quang Anh
    Member

    Thanks Steve for quick reply! Everythings okay now.

Viewing 5 posts - 1 through 5 (of 5 total)