Right now I have a p element in header.php containing the address and phone number my client wishes to use for contact info. How can I set this up so that it is editable through the WP admin area so that my client can easily change this in the future?
Leave a Reply
You must be logged in to post a comment.
Store it in your theme options. Read the series of articles called The Complete Guide To The WordPress Settings API. Spare no effort to read it, especially 4th article about Theme Options.
I have written a plugin exactly for this case: Public Contact Data. Last update just yesterday. 🙂
It can be extended easily by a filter
'pcd_fields'
, and the data are accessible bydo_action()
or custom shortcodes. It is translatable (of course), and a German translation is already included.Before that I have put these things into themes too. But managing that was awkward, especially updates for multiple themes using this code.
Screenshot: Background shows the output in a theme, foreground the translated option fields.