• how it possible ??
    http://prntscr.com/8b4cyh

    this is my meta box code

    <?php
    /**
    * Initialize the custom Meta Boxes.
    */
    add_action( ‘admin_init’, ‘diva_meta_boxes’ );

    /**
    * Meta Boxes demo code.
    *
    * You can find all the available option types in demo-theme-options.php.
    *
    * @return void
    * @since 2.0
    */
    function diva_meta_boxes() {

    /**
    * Create a custom meta boxes array that we pass to
    * the OptionTree Meta Box API Class.
    */
    $diva_meta_boxes = array(
    ‘id’ => ‘diva_select_layout’,
    ‘title’ => __( ‘Select The Layout’, ‘theme-text-domain’ ),
    ‘desc’ => ”,
    ‘pages’ => array( ‘page’, ‘all_goals’ ),
    ‘context’ => ‘normal’,
    ‘priority’ => ‘high’,
    ‘fields’ => array(
    array(

    ‘id’ => ‘select_layout_diva’,
    ‘type’ => ‘select’,
    ‘desc’ => __( ‘<b>Please choose the layout of this page.</b>’, ‘theme-text-domain’ ),

    ‘choices’ => array(
    array(
    ‘value’ => ”,
    ‘label’ => ‘– Choose One –‘
    ),
    array(
    ‘value’ => ‘front’,
    ‘label’ => ‘Front Page’
    ),
    array(
    ‘value’ => ‘blog’,
    ‘label’ => ‘Blog’
    )
    )
    )
    )
    );

    /**
    * Register our meta boxes using the
    * ot_register_meta_box() function.
    */

    ot_register_meta_box( $diva_meta_boxes );

    }

    https://wordpress.org/plugins/option-tree/

  • The topic ‘how to give options in sub select type in meta box’ is closed to new replies.