Tagged: ,

Viewing 2 reply threads
  • Author
    Posts
    • #2553
      kjprince
      Member

      I’ve read up on creating workflows.

      I’m trying to create a workflow within the ‘page’ post-type and add some meta boxes to a tab.

      I’ve got my header setup:

      <?php
      /*
      Flow: WorkFlow
      Page: post.php, post-new.php, post-edit.php
      Post Type:
      Header: true
      Position: title
      */
      ?>

      I’ve created one tab:

      <?php
      /*
      Title: Meta Data
      Order: 1
      Flow: WorkFlow
      */
      
      ?>

      And I’ve got one meta-box created:

      <?php
      /*
      Title: ID#
      Description: Provide an ID# 
      Post Type: page
      Capability:
      Context: normal
      Priority: high
      Order: 1
      Status: published
      Locked: true
      New: true
      Collapse: false
      */
      
      // Let's create a text box field
       piklist('field', array(
         'type' => 'text'
         ,'scope' => 'post_meta'
         ,'field' => 'my_field_id'
         ,'label' => __('ID#')
         ,'description' => __('Identification Number')
         ,'attributes' => array(
           'class' => 'text'
         )
       ));
      ?>

      I cannot figure out how to add the meta box to one of the work flow tabs.

      I see the example but it says to target the element ID, which isn’t listed as a valid parameter on the meta box page.

      This snippet didn’t help me out:

        piklist('include_meta_boxes', array(
          'piklist_meta_help'
          ,'piklist_meta_field_text'
          ,'piklist_meta_field_select'
          ,'piklist_meta_field_radio'
          ,'piklist_meta_field_checkbox'
          ,'piklist_meta_field_upload'
          ,'piklist_meta_field_taxonomies'
          ,'piklist_meta_field_featured_image'
          ,'piklist_meta_field_relate'
          ,'piklist_meta_field_comments'
        ));

      So how do I display that custom meta box on my new workflow tab?

    • #2554
      kjprince
      Member

      Solved.

      Just removed some of the additional meta data from the meta box

      /*
      Title: ID#
      Description: Provide an ID# 
      Post Type: page
      Capability:
      Context: normal
      Priority: high
      Order: 1
      Status: published
      Locked: true
      New: true
      Collapse: false
      */

      Also missed the post type in the header:

      /*
      Flow: WorkFlow
      Page: post.php, post-new.php, post-edit.php
      Post Type:
      Header: true
      Position: title
      */
    • #2557
      Steve
      Keymaster

      @kjprince– The examples in the docs are designed to show ALL the available parameters. Be careful when doing a straight copy/paste. In most situations you will need to edit or remove some.

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