I’m using add_settings_field to add some more details to a settings menu, but not sure how I save the settings, or call them back in my theme.

Here is the code thus far

add_action('admin_init','vimeo_setup');

function vimeo_setup(){
add_settings_field('vimeo_id','Vimeo ID','display_vimeo','general');
}

function display_vimeo(){

 echo '<input  type="text" name="vimeo_id" id="vimeo_id" value="" size="30" style="width:85%" />';
 echo '<p><small> Enter your Vimeo ID here.</small></p>';
}

2 Answers
2

Documentation for add_settings_field() Says following:

You MUST register any options used by this function with register_setting() or they won’t be saved and updated automatically.

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *