Tagged: ,

This topic contains 2 replies, has 2 voices, and was last updated by  Dan 1 year, 4 months ago.

  • Author
    Posts
  • #8842

    Dan
    Participant

    Hi There,

    Struggling to save multiple tags for a CPT with a custom taxonomy.
    It only saves the latest value selected rather than all the values selected.
    Please help!

    Taxonomy:

    function register_event_type($taxonomies) 
        {
            $taxonomies[] = array(
                'post_type' => 'mrc_event'
                ,'name' => 'mrc_event_type'
                ,'show_admin_column' => true
                ,'configuration' => array(
                  'hierarchical' => false
                  ,'labels' => piklist('taxonomy_labels', 'Event Type')
                  ,'hide_meta_box' => false
                  ,'show_ui' => false
                  ,'query_var' => true
                  ,'rewrite' => array( 
                    'slug' => 'event-type' 
                )
                ));
            return $taxonomies;
        }

    Taxonomy select field on metabox:

    piklist('field', array(
      'type' => 'checkbox'
      ,'scope' => 'taxonomy' 
      ,'field' => 'mrc_event_type'
      ,'label' => 'Categories'
      ,'description' => 'Terms will appear when they are added to this taxonomy.'
      ,'choices' => piklist(get_terms(array(
          'taxonomy' => 'mrc_event_type'
          ,'hide_empty' => false
        ))
        ,array(
          'term_id'
          ,'name'
        )
      )
    ));
  • #8843

    Steve
    Keymaster

    Which version of Piklist are you using?

  • #8844

    Dan
    Participant

    Hi Steve,

    Version 0.9.9.16

    Cheers,

    Dan

You must be logged in to reply to this topic.