1

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!

2

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

1

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.

-1

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!

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.