WordPress:Function Reference/get option
来自站长百科
Description
A safe way of getting values for a named option from the options database table. If the desired option does not exist, FALSE will be returned.
Usage
%%% <?php echo get_option('show'); ?> %%%
Examples
Show Blog Title
Displays your blog's title in a <h1> tag.
%%%
<?php echo get_option('blogname'); ?>
%%%
Show Character Set
Displays the character set your blog is using (ex: UTF-8)
%%%
Character set: <?php echo get_option('blog_charset'); ?>
%%%
Retrieve Administrator E-mail
Retrieve the e-mail of the blog administrator, storing it in a variable.
%%% <?php $admin_email = get_option('admin_email'); ?> %%%