Adding Global Custom Fields

There are times when you would rather have an editable custom field for global regions such as the header or footer of the site saving you from having to insert hard coded text etc. The key is to first insert the following into the theme’s function file:

First add the options page:

Then define, create, and save those fields:

Remember a defined field will need to have a corresponding form input value!

For a text area rather than a text field, follow this convention:

Then the defined fields can be inserted anywhere you want like this: