- This topic has 3 replies, 2 voices, and was last updated 7 years, 6 months ago by
Steve.
-
AuthorPosts
-
-
August 5, 2014 at 12:08 pm #2153
tuckerjoenzMemberI’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!
-
August 5, 2014 at 12:43 pm #2156
SteveKeymaster@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.
-
August 5, 2014 at 12:50 pm #2157
tuckerjoenzMemberAhh, ok got it! I just deleted those two. I knew it had to be something simple. Thanks @Steve
-
August 5, 2014 at 12:53 pm #2158
SteveKeymasterGreat! Closing ticket.
-
-
AuthorPosts
- The topic ‘Getting Meta-Box to show up on a page’ is closed to new replies.