how can achieve this functionality. That I can change the themes "slogan" from admin and I don't have to go edit the themes source files.

I think that there is some theme options functionality. But how to use it and maybe somebody can point me to the correct path.

Added screenshot to clarify what I mean under slogan: enter image description here


In wordpress that's a tagline..

maybe a plugin like this http://wordpress.org/extend/plugins/advanced-tagline/ can help you.


I just have this in my function.phpfile:

// Run the scripts for triggering the below functions
add_action('admin_menu', 'cms_options_menu');

function cms_options_menu() {
  //create new top-level menu
  add_menu_page('CMS options', __('CMS options'), 'administrator', __FILE__, 'cms_options_page',plugins_url('/images/icon.png', __FILE__));

  //call register settings function
  add_action( 'admin_init', 'register_custom_fields' );

function register_custom_fields() {
  //register our settings
  register_setting( 'cms-options', 'slogan' );

function cms_options_page() {
  <form method="post" action="options.php">
    <table class="form-table">
      <tr valign="top">
        <td scope="row">
          <?php _e('Slogan'); ?>
          <input type="text" name="slogan" value="<?php echo get_option('slogan'); ?>" />
    <p class="submit">
      <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
<?php } ?>

Then you just add whatever text you want and save the change.

  • And then what? How can I call it on the site? And where can I edit the slogan? I cant find any settings place in themes menu. Aug 7 '11 at 22:25
  • I've added the add_action function. Just put all this in the function.php file, and it should all work fine.
    – Steven
    Aug 8 '11 at 6:52
  • Ok, but where should the admin area appear? This is my first time ever, using wp.. Aug 8 '11 at 12:06
  • I understand now, but for the record. register_setting( 'cms-options', 'slogan ); there should be ' after slogan. Also, there is no submit button and it seems not to save the option.. it redirects it to some other option page. Aug 8 '11 at 13:02
  • Ah, I forgot the submit button. I've added it now - and fixed the typo :)
    – Steven
    Aug 8 '11 at 14:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.