Created
December 1, 2014 18:36
-
-
Save wpmark/8d96847316d5f46a6174 to your computer and use it in GitHub Desktop.
Add Additional Fields to WP Post Type Meta
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function wpptm_add_select_input( $settings ) { | |
/* add our setting to the settings array */ | |
$settings[] = array( | |
'type'=> 'select', | |
'label'=> 'A Select Box', | |
'id'=> ‘selectbox’, | |
'options' = array( | |
array( | |
'name' => 'Display Name One', | |
'value' => '1' | |
), | |
array( | |
'name' => 'Display Name Two', | |
'value' => '2' | |
) | |
) | |
'class'=> 'select_box_css_class' | |
); | |
/* return the modified settings array */ | |
return $settings; | |
} | |
add_filter( 'wpptm_settings', 'wpptm_add_select_input', 20 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment