WordPress:Function Reference/get option

来自站长百科
Xxf3325讨论 | 贡献2008年7月19日 (六) 15:25的版本 (新页面: == 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 == %%% <...)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航、​ 搜索

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'); ?> %%%

Parameters

Related

模板:Tag General Tags

模板:Tag Footer