Tagged: 

Viewing 7 reply threads
  • Author
    Posts
    • #2360
      baar
      Member

      Hi everyone,

      I want to add taxonomy terms and taxonomy term meta data in the “add new” screen.

      It’s working great at the Taxonomy add / edit page.

      /*
      Title: More Informations
      Taxonomy: text_from
      Order: 0
      */
      piklist('field', array(
              'type' => 'text'
              ,'field' => 'birthdate'
              ,'label' => __('Birthdate')
              ,'description' => __('Enter date of birth.')
              ,'value' => 'DD/MM/YYYY'
      ));

      Now I want to display 2 fields in the “add new” screen.
      I’ve tried the following:

      /*
      Title: Taxonomies
      Post Type: cpt
      Order: 20
      Priority: default
      Collapse: false
      */
      
      // This one here is working as it should
      piklist('field', array(
          'type' => 'radio'
          ,'scope' => 'taxonomy'
          ,'field' => 'text_from'
          ,'label' => 'From Author etcs'
          ,'description' => 'Author etc....'
          ,'choices' => piklist(
            get_terms('text_from', array(
              'hide_empty' => false
            ))
            ,array(
              'term_id'
              ,'name'
            )
          )
        ));
      
      // Here I dont know how to set the right scope ( I thinks it's term_meta )
      // I also dont know how to tell piklist which term's term meta should be addressed
      
      piklist('field', array(
              'type' => 'text'
              ,'scope' => 'term_meta'
              ,'field' => 'birthdate'
              ,'label' => __('Birthdate')
              ,'description' => __('Enter date of birth.')
              ,'value' => 'DD/MM/YYYY'
      ));
      

      Thanks in advance

    • #2361
      Steve
      Keymaster

      @barr- due to the way the WordPress new term screen is setup we have disabled the ability to add fields on term creation. Many of our fields didn’t layout properly.

    • #2362
      baar
      Member

      Sorry didn’t make my self clear enough.

      I want to add these fields to this page => “post-new.php?post_type=cpt”

      So I can build a workflow, exp:

      – Add Post Title and Post Content
      – Assign existing terms

      – Create terms
      – Create term_meta

      – publish post

    • #2363
      Steve
      Keymaster

      @baar– So, “birthdate” will be term meta for “text_from”, and you want to enter data into “birthdate” here: post-new.php?post_type=cpt ?

    • #2364
      baar
      Member

      Yes, birthdate data and text_from data.

    • #2365
      Steve
      Keymaster

      @baar– We’re looking into this.

    • #2366
      baar
      Member

      Thank you so much!

    • #2494
      Steve
      Keymaster

      @baar– Managing Term Meta from a Post screen is something we are not going to support right now.

Viewing 7 reply threads
  • You must be logged in to reply to this topic.