Include WordPress options anywhere shortcodes are accepted.
Author: | wp247 (profile at wordpress.org) |
WordPress version required: | 4.0 |
WordPress version tested: | 5.8 |
Plugin version: | 1.2 |
Added to WordPress repository: | 09-04-2015 |
Last updated: | 08-08-2021
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|
Rating, %: | 0 |
Rated by: | 0 |
Plugin URI: | |
Total downloads: | 993 |
Active installs: | 10+ |
Click to start download |
Include WordPress options anywhere shortcodes are accepted.
Syntax
[wp247_get_option option=”desired-option” default=”desired-default” scope=”desired-scope“]
where:
-
desired-option is the option to be retrieved from the WordPress wp_options table. Default: none
-
desired-default is the default value to be returned if the desired option does not exist. Default: “”
-
desired-scope indicates which type of option is to be retrieved. scope=”site” will retrieve options using the WordPress get_site_option function. All other values are ignored and the WordPress get_option function will be used to retrieve the desired option value. Default: “”
Examples
Include the WordPress site URL in some text somewhere:
- This is my site’s URL: [wp247_get_option option=”siteurl”].
Set up a copyright notice in a footer widget:
- Copyright © [wp247_get_option option=’blogname’]. All rights reserved.
ChangeLog