Codex tools: Log in
Languages: English • 日本語 • Русский • Tiếng Việt • 中文(简体) • (Add your language)
Contents |
A safe way of getting values for a named option from the options database table. If the desired option does not exist, or no value is associated with it, FALSE will be returned.
<?php echo get_option( $show, $default ); ?>
Mixed values for the option.
More information: Option_Reference
Displays your blog's title in a <h1> tag.
<h1><?php echo get_option('blogname'); ?></h1>
Displays the character set your blog is using (ex: UTF-8)
<p>Character set: <?php echo get_option('blog_charset'); ?> </p>
Retrieve the e-mail of the blog administrator, storing it in a variable.
<?php $admin_email = get_option('admin_email'); ?>
get_option() is located in wp-includes/functions.php.
Options API: get_option(), add_option(), update_option(), delete_option()