Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ahmedmusawir/c305d4c3e7d6cd4dd62429193b4a58da to your computer and use it in GitHub Desktop.
Save ahmedmusawir/c305d4c3e7d6cd4dd62429193b4a58da to your computer and use it in GitHub Desktop.
WP-PLUGINS - ENTRY FOR SETTINGS GENERAL ONLY - FOOTER MESSAGE
/**
*
* Just the general settings
*
*/
function demo_init_theme_options() {
// Define the settings field
add_settings_field(
'footer_message', //The ID (or the name) of the field
'Theme Footer Message', //The Label
'demo_footer_message_display', //The Callback
'general' //The section where we add this
);
// Register the 'footer_message' setting with the 'General' section
register_setting(
'general',
'footer_message'
);
}
add_action( 'admin_init', 'demo_init_theme_options' );
function demo_footer_message_display()
{
?>
<input type="text" name="footer_message" id="footer_message" value="<?php echo get_option( 'footer_message' ); ?>" />
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment