how to give options in select type in meta box
-
How do i add options in select type(drop down menu) meta box?
The code i’m below.<?php add_action( 'admin_init', 'custom_meta_boxes' ); function custom_meta_boxes() { $why_us_meta_box = array( 'id' => 'why_us_meta_box', 'title' => __( 'Why us meta box', 'theme-text-domain' ), 'desc' => '', 'pages' => array( 'why-us-items' ), 'context' => 'normal', 'priority' => 'high', 'fields' => array( array( 'label' => __( 'Icon', 'theme-text-domain' ), 'id' => 'icon', 'desc' => __( '<b>Please choose an icon from <a target="_blank" href="https://www.fontawesome.io/icons/">fontawesome</a></b>', 'theme-text-domain' ), 'std' => 'user', 'type' => 'select', ) ) ); if ( function_exists( 'ot_register_meta_box' ) ) ot_register_meta_box( $why_us_meta_box ); }
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘how to give options in select type in meta box’ is closed to new replies.