Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

up vote 1 down vote accepted

In wordpress that's a tagline..

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

share|improve this answer
    
Perfect, thanks! –  Kalle H. Väravas Aug 7 '11 at 21:08

I just have this in my function.phpfile:

<?php
// 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'); ?>
        </td>
        <td>
          <input type="text" name="slogan" value="<?php echo get_option('slogan'); ?>" />
        </td>
      </tr>
    </table>
    <p class="submit">
      <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
    </p>
  </form>
<?php } ?>

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

share|improve this answer
    
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. –  Kalle H. Väravas 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.. –  Kalle H. Väravas 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. –  Kalle H. Väravas 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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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