Custom Global Variables
Your website likely has snippets of the same info appearing in various places throughout. Maybe your email address. Your phone number. A link. Most probably very important stuff you’ll obviously want correct. What happens when you need to update and make a change to any of them? You’ll be facing the chore of needing to pore through your whole site and making edits wherever that info appears. Not fun.
With WordPress, you could of course get a search-and-replace plugin, then hope the tool finds everything and updates them properly. You could also skip the plugin entirely and use MySQL, which isn’t for the faint of heart, but you’ll still want to go through the site and eyeball to make sure you didn’t screw things up.
Or, you can head all that off and use variables in your site’s content. Just make one easy teeny change to a variable’s “value,” and everywhere that variable appears on your site, it’ll show the new info. Mind-numbing chore totally avoided! Time saved! Whole site updated instantly!
That’s what the Custom Global Variables plugin for WordPress lets you do. Simple! The tool itself is just as simple and easy to understand; I doubt you’ll need instructions to work it. Just enter a name for a variable, and a value for it. To use a variable in your posts, pages, etc., just copy its CGV shortcode (which is just text) and paste it wherever you want it to appear, just like any text.
Let’s say you created a variable named myphone, and give it a value of (123) 456-7890. Its shortcode will look something like this:
Instead of typing in your phone number in posts or pages, just type [cgv myphone]. Guess what visitors will see when they use your site. Cool huh?
These shortcodes can even be used embedded in your code. In links, for example. Even in PHP code for templates, etc., if you’re so inclined.
Bet you can come up with other uses for this nifty tool!