How should I store global information such as a phone number so that it is editable through the CMS?

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?

Related posts

Leave a Reply

2 comments

  1. 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 by do_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.

    enter image description here