A client I recently built a site for wanted to display company contact details in multiple places on the front-end of his site.
A simple enough task, yes, but also one I knew would quickly become tedious – not only would I have to copy and paste the same information in many different places but if the client wanted to update his contact details they would have to be edited in various locations.
The solution? Global variables. Unfortunately, WordPress doesn’t provide a way to set up and use global variables by default, so I went about putting together a custom solution that would allow my client to easily input his details in one place so they could be disseminated and published across his site.