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 making a theme for a client (first time using Wordpress), and the client would like to have multiple site "descriptions" to be available. The first one as the main description, and the second one as another block of text in the header which can be changed.

Is there any way to add such functionality to a theme? I can instruct the client to manually edit the .php files, but I'd like to do something a bit more elegant, like adding an option to the Dashboard.

Thanks!

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

not 100% sure what you're after but this may help ... i did a site one time and one special set of "pages" on the site were sort of sectionalised ( eg each page consisted of a title and about 4 other "fields" ) .... the way i did it in the back end was to do like dzogchen suggested use custom fields ... so i used the title from the wordpress system and then i set up 4 custom fields and then to make it look good for the user what i did was to go to the "screen options" at the top and turn off the visual editor ..... ### actually sorry scratch all that (i've left it in because it may actually work for you) #### ... i think how i achieved this was that i used a custom post type and did all of what i just said in the programming because the template tags allow you to turn on and off what is seen in the editor .... yes it's coming back to me now ( sorry but it's a while back ) .... what you'd need to do that is a combination of custom post types and the settings api ... this makes it very slick but warning the settings api is very good, very powerful but takes a bit of working out ( also tip if you are going this way there are two ways of doing settings in wp the new way and the old .... dont get mixed up )

share|improve this answer
1  
Wow, thanks! I think the settings API is exactly what I need, as I can make a few more fields for the client to use. I will play around with this for a while... –  Blender Jun 21 '11 at 4:34
1  
I suggest Chip Bennet's great tutorial on how to incorporate the settings API in Wordpress. –  mike23 Jun 21 '11 at 5:53
    
yes you need some documentation on the settings api .... in addition to mike23's link i think i also found this one helpful planetozh.com/blog/2009/05/… –  byronyasgur Jun 23 '11 at 20:29
add comment

You could have different "descriptions" as a custom field, and the user could enter the description there. there could be a custom description for each page/post, if you like.....

You would need to write some conditional php in header.php to either display the default site description or the custom one if it exists. Look in the codex for get_post_custom_values() for coding specifics.

share|improve this answer
    
Thanks for the answer. I was looking for something along the lines of another field in the Dashboard interface, as it would be a bit more streamlined and readily-accessible to the user. Is using a custom field like that the only way to achieve this? –  Blender Jun 20 '11 at 21:42
add comment

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.