Codex tools: Log in
Languages: English • Türkçe • 日本語 • Português do Brasil • 中文(简体) • (Add your language)
Contents |
Displays information about your site, mostly gathered from the information you supply in your User Profile and General Settings WordPress Administration Screens. It can be used anywhere within a template file. This always prints a result to the browser. If you need the values for use in PHP, use get_bloginfo().
<?php bloginfo( $show ); ?>
wp-includes/version.php.
Displays your blog's title in a <h1> tag.
<h1><?php bloginfo('name'); ?></h1>
Displays your blog's title in a link.
<a href="<?php bloginfo('url'); ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a>
Displays the character set your blog is using (e.g. "utf-8").
<p>Character set: <?php bloginfo('charset'); ?> </p>
Displays the tagline of your blog as set in Settings > General.
<p><?php bloginfo('description'); ?> </p>
From version 2.7. On host example, the Blog address (URL) is shown at http://www.example.com/home, and the WordPress address (URL) is installed at http://www.example.com/home/wp.
Note that directory URLs are missing trailing slashes.
admin_email = admin@example.com atom_url = http://www.example.com/home/feed/atom charset = UTF-8 comments_atom_url = http://www.example.com/home/comments/feed/atom comments_rss2_url = http://www.example.com/home/comments/feed description = Just another WordPress blog home = http://www.example.com/home (DEPRECATED! use url option instead) html_type = text/html language = en-US name = Testpilot pingback_url = http://www.example.com/home/wp/xmlrpc.php rdf_url = http://www.example.com/home/feed/rdf rss2_url = http://www.example.com/home/feed rss_url = http://www.example.com/home/feed/rss siteurl = http://www.example.com/home (DEPRECATED! use url option instead) stylesheet_directory = http://www.example.com/home/wp/wp-content/themes/largo stylesheet_url = http://www.example.com/home/wp/wp-content/themes/largo/style.css template_directory = http://www.example.com/home/wp/wp-content/themes/largo template_url = http://www.example.com/home/wp/wp-content/themes/largo text_direction = ltr url = http://www.example.com/home version = 3.5 wpurl = http://www.example.com/home/wp
bloginfo() is located in wp-includes/general-template.php.
| WordPress Directories: | ||
|---|---|---|
| home_url() | Home URL | http://www.example.com |
| site_url() | Site directory URL | http://www.example.com or http://www.example.com/wordpress |
| admin_url() | Admin directory URL | http://www.example.com/wp-admin |
| includes_url() | Includes directory URL | http://www.example.com/wp-includes |
| content_url() | Content directory URL | http://www.example.com/wp-content |
| plugins_url() | Plugins directory URL | http://www.example.com/wp-content/plugins |
| theme_url() | Themes directory URL (#18302 - wp3.5) | http://www.example.com/wp-content/themes |
| wp_upload_dir() | Upload directory URL (returns an array) | http://www.example.com/wp-content/uploads |