This plugin is outdated and might not be supported anymore
Custom Global Variables

Custom Global Variables

Details
View on WordPress

Create your own custom variables to manage information on your website such as:

  • Phone numbers
  • Addresses
  • Social media links
  • HTML snippets
  • And anything else
    test

Easily access them globally in WordPress and PHP.

Why you need it

Rather than having to change something like an email address across multiple pages, you can do it in one place. Avoid the pitfalls of hard coding information in your WordPress theme that is likely to change.

Why it’s better

  • Your variables are stored and retrieved locally without any calls to the database. That means faster load times for your pages!
  • Variables can be accessed easily in PHP from the global scope.

Usage

Display your variables using the shortcode syntax:

[cgv variable-name]

Or using the superglobal in PHP:

<?php echo $GLOBALS['cgv']['variable-name'] ?>

Details

Plugin code:
custom-global-variables
Plugin version:
1.1.2
Outdated:
Yes
WP version:
3.0.1 or higher
PHP version:
5.6 or higher
Test up to WP version:
6.1.7
Total installations:
5,000
Last updated:
2023-03-22
Rating:
Times rated:
10
custom-global-variables
options
settings
shortcodes
variables