Codex

Function Reference/bloginfo

Contents

Description

Displays information about your blog, mostly gathered from the information you supply in your User Profile and General Options from the WordPress Administration panels (Settings → General). It can be used anywhere within a page template. This always prints a result to the browser. If you need the values for use in PHP, use get_bloginfo().

Usage

 <?php bloginfo$show ); ?> 

Parameters

Note that directory URLs are missing trailing slashes. If using child-theme, that has parent-theme as the parent. Using bloginfo() without a parameter will default to bloginfo('name').

name                 = Testpilot
description          = Just another WordPress blog
admin_email          = admin@example

url                  = http://example/home
wpurl                = http://example/home/wp

stylesheet_directory = http://example/home/wp/wp-content/themes/child-theme
stylesheet_url       = http://example/home/wp/wp-content/themes/child-theme/style.css
template_directory   = http://example/home/wp/wp-content/themes/parent-theme
template_url         = http://example/home/wp/wp-content/themes/parent-theme

atom_url             = http://example/home/feed/atom
rss2_url             = http://example/home/feed
rss_url              = http://example/home/feed/rss
pingback_url         = http://example/home/wp/xmlrpc.php
rdf_url              = http://example/home/feed/rdf

comments_atom_url    = http://example/home/comments/feed/atom
comments_rss2_url    = http://example/home/comments/feed

charset              = UTF-8
html_type            = text/html
language             = en-US
text_direction       = ltr
version              = 3.1

Examples

Show Blog Title

Displays your blog's title in a <h1> tag.

<h1><?php bloginfo('name'); ?></h1>

Show Blog Title in Link

Displays your blog's title in a link.

<a href="<?php bloginfo('url'); ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a>

Show Character Set

Displays the character set your blog is using (ex: utf-8)

<p>Character set: <?php bloginfo('charset'); ?> </p>

Show Blog Description

Displays Tagline for your blog as set in the Administration panel under General Options.

<p><?php bloginfo('description'); ?> </p>

Notes

Change Log

  • Since: 0.71

Source File

bloginfo() is located in wp-includes/general-template.php.

Related

Directory URL Tags

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
wp_upload_dir() Upload base URL in ['baseurl'] entry of returned array http://www.example.com/wp-content/uploads
See also index of Function Reference and index of Template Tags.