Back to Top

Using Global Variables in WordPress

Using Global Variables in WordPress

A global variable, as it name suggests, is simply a type of variable that is available for use within any fraction of your codes. PHP's global variables and all their glory can be used within WordPress to help you eliminate code duplication, and in some situations save you some database queries.

Even though many developers think that using global variable is simply a bad practice, if you use it the right way there... more

Page 1 of 1 1