[Plugin: OptionTree] Problem adding customised list-items
-
I’m using the latest v2.0.8 and have installed option tree into the theme folder. I’m currently trying to setup List-Items in a meta box.
When I add the following code, the list item works fine.
$standardpage = array( 'id' => 'sp', 'title' => 'Main Content', 'desc' => '', 'pages' => array( 'page' ), 'context' => 'normal', 'priority' => 'high', 'fields' => array( array( 'label' => 'Content', 'id' => 'sp_content', 'type' => 'list-item', 'desc' => 'Example Text', 'settings' => array( array( 'label' => 'Subtitle', 'id' => 'sp_subtitle', 'type' => 'text', 'desc' => 'Example text', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '' ) ), 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '' ) ) ); ot_register_meta_box( $standardpage );
However, when I try and add another field, for example …it defaults to Title, Image, Link, description and does not use my custom fields
$standardpage = array( 'id' => 'sp', 'title' => 'Main Content', 'desc' => '', 'pages' => array( 'page' ), 'context' => 'normal', 'priority' => 'high', 'fields' => array( array( 'label' => 'Content', 'id' => 'sp_content', 'type' => 'list-item', 'desc' => 'Example Text', 'settings' => array( array( 'label' => 'Subtitle', 'id' => 'sp_subtitle', 'type' => 'text', 'desc' => 'Example text', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '' ), array( 'label' => 'Example', 'id' => 'examplefield', 'type' => 'text', 'desc' => 'Example text', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '' ) ), 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '' ) ) ); ot_register_meta_box( $standardpage );
Any ideas? I think it does this in the theme options too.
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘[Plugin: OptionTree] Problem adding customised list-items’ is closed to new replies.