Tagged: ,

Viewing 3 reply threads
  • Author
    Posts
    • #2153
      tuckerjoenz
      Member

      I’m working on adding a custom meta-box editor for adding sections in a page. I have added this code:

      <?php
      /*
      Title: Sections
      Description: New Sections
      Post Type: page
      Context: advanced
      Priority: high
      Order: 1
      Status: published,prequote,repair-quote
      Locked: true
      New: true
      Collapse: true
      */

      piklist(‘field’, array(
      ‘type’ => ‘editor’
      ,’field’ => ‘post_content_add_more’
      ,’label’ => ‘Add Section’
      ,’add_more’ => true
      ,’description’ => ‘Add content for a new section on the page.’
      ,’value’ => ‘Lorem ipsum dolor sit amet, consectetur adipiscing elit.’
      ,’options’ => array (
      ‘media_buttons’ => true
      ,’teeny’ => true
      ,’textarea_rows’ => 5
      ,’drag_drop_upload’ => true
      )
      ));

      piklist(‘shared/code-locater’, array(
      ‘location’ => __FILE__
      ,’type’ => ‘Meta Box’
      ));

      ?>

      And placed it in a file named pages-sections.php inside piklist/parts/meta-boxes/ but when I add a new page this does not show up at all. What am I missing? Thanks!

    • #2156
      Steve
      Keymaster

      @tuckerjoenz– You have a few parameters that are conflicting with each other.

      Status: This determines which post statuses the box shows on. You currently have it set to: published,prequote,repair-quote. Is this what you want?
      New: Only show on creation of new post.

      If you don’t want these features, you can just remove the parameters all together.

    • #2157
      tuckerjoenz
      Member

      Ahh, ok got it! I just deleted those two. I knew it had to be something simple. Thanks @Steve

    • #2158
      Steve
      Keymaster

      Great! Closing ticket.

Viewing 3 reply threads
  • The topic ‘Getting Meta-Box to show up on a page’ is closed to new replies.