Hi, Thanks for your help. I am fairly new so I am sorry if I dont fully understand things. Its probably easier if I put my full options page code here:
<?php
function enqueue_options_page_scripts() {
wp_enqueue_script('options-page-script', get_template_directory_uri().'/options-page/options.js', 'jquery');
wp_enqueue_style('options-page-style', get_template_directory_uri().'/options-page/options-style.css');
wp_enqueue_script('jquery-ui-tabs', 'jquery');
wp_enqueue_script('jquery-ui-sortable', 'jquery');
}
add_action( 'admin_enqueue_scripts', 'enqueue_options_page_scripts' );
add_action('admin_menu', 'create_options_menu_page');
function create_options_menu_page() {
add_menu_page(
'Website Options',
'Options (DEV)',
'administrator',
'website-options-ct',
'options_page_callback'
);
add_action( 'admin_init', 'register_options_page_settings' );
}
function register_options_page_settings() {
register_setting( 'options-page-settings-group', 'social_links' );
}
function options_page_callback() {
?>
<div class="wrap custom-options-page">
<h1>Options</h1>
<form method="post" action="options.php">
<?php settings_fields( 'options-page-settings-group' ); ?>
<?php do_settings_sections( 'options-page-settings-group'); ?>
<div class="options-left-panel">
<div class="options-left-panel-inside">
<div id="option-nav-tabs" class="option-nav-tabs">
<ul class="nav-links">
<li><a href="#tab-one"><strong>Social Links</strong></a></li>
</ul>
<div class="clear"></div>
<div id="tab-one">
<input type="text" name="social_link_name[]" class="widefat">
<input type="url" name="social_link_url[]" class="widefat">
<input type="text" name="social_link_name[]" class="widefat">
<input type="url" name="social_link_url[]" class="widefat">
<input type="text" name="social_link_name[]" class="widefat">
<input type="url" name="social_link_url[]" class="widefat">
<?php
$array_of_options = array(
'social_link_names' => $_POST['social_link_name[]'],
'social_link_urls' => $_POST['social_link_url[]']
);
update_option( 'social_links', $array_of_options );
?>
</div>
</div>
</div>
</div>
<div class="options-right-panel">
<div class="options-right-panel-inside">
<?php submit_button(); ?>
</div>
</div>
</form>
</div>
<?php }