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.

I'm developing a theme for a client, and I want to allow her to change the site title, description, and her password as needed. However, I don't want to give access to all of the other options (e.g. the site URL).

I have some experience creating a theme options panel (via this article on nettuts+), and was thinking it would be great if I could put those options into the panel as well. Would be great to get some direction!

share|improve this question

3 Answers 3

An easier approach would be to leave the options-general.php sub menu unblocked and define:

define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');

in your wp-config.php. When the siteurl and homeurl are defined in wp-config.php the options are grayed out on the options page. This would allow your client to change the site title, description, time zone and registration settings.

enter image description here

share|improve this answer

Just create input fields on your options page and on postback do a" update_option('blogname') or update_option('blogdescription') with the contents of your custom fields.

share|improve this answer

Also wondering about this - I tried the following with no luck:

// Get setting for site tagline and set it equal to theme option
function of_site_name_tagline_update() { 
   update_option('blogname','$theme_option_blogname');
   update_option('blogdescription','$theme_option_blogdescription'); 
} 
add_action('update_option', 'of_site_name_tagline_update');

This is of course assuming my theme option calls are the variables listed above. Even when I enter in a static value - it doesn't update. Any help would be greatly appreciated. Thanks!

share|improve this answer

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.