I've created a custom options page and referenced it through my functions.php
file. When i do this, the Pages
option is removed from the WP dashboard, almost as if overwritten by the new options page.
The pages continue to exist, and I can navigate directly to the new page editor, but I cannot access it via the menu in the dashboard.
This is my code, within fixtures.php
<?php
add_action( 'admin_menu', 'fixtures_menu' );
function fixtures_menu() {
add_menu_page( 'Fixtures Info', 'Fixtures Info', 'manage_options', 'fixtures-info', 'fixture_options', '../wp-content/themes/scrum-and-coke/img/infoicon.png', 20 );
}
add_action('admin_init', 'register_settings');
function register_settings() {
register_setting('settings-group','season');
}
function fixture_options()
{
?>
<div class="wrap">
<h2>Fixtures Info</h2>
<p>This information is used on the fixtures & result page.</p>
<form method="post" action="options.php">
<?php settings_fields( 'settings-group' ); ?>
<?php do_settings_sections( 'settings-group' ); ?>
<p><input type="submit" value="Save" class="button-primary" /></p>
<fieldset style="border: 1px solid #ccc !important;padding: 10px !important;"><legend>Season information</legend>
<p><strong>Name of season/premiership:</strong><br />
<input type="text" name="season" size="45" value="<?php echo get_option('season'); ?>" />
</p>
</fieldset>
</fieldset>
<p><input type="submit" value="Save" class="button-primary" /></p>
</form>
</div>
<?php } ?>
Which is then referenced in the functions.php
file
require_once 'fixtures.php';
Any ideas why Pages
is being overwritten/disappearing from the dashboard?