bloginfo – WordPress*リファレンス
あなたがあなたのUser ProfileとOptions設定でWordPress管理パネルから提供する情報からほとんど集められたあなたのブロッグに関する情報を表示します。 ページテンプレートの中にどこでもそれを使用することができます。 これはいつもブラウザに結果を印刷します。 あなたがPHPでの使用に値を必要とするなら、使用は_bloginfo()を手に入れます。
⇒Displays information about your blog, mostly gathered from the information you supply in your User Profile and General Options from the WordPress Administration panels. 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().
bloginfoのテンプレートタグ使用方法
<?php bloginfo('show'); ?>
例
ブログタイトルを表示
<h1>タグにあなたのブロッグのタイトルを表示します。
⇒Displays your blog’s title in a <h1> tag.
<h1><?php bloginfo('name'); ?></h1>
ブログの文字コードを表示
あなたのブロッグが使用している文字の組を表示します。(例えば、utf-8)
⇒Displays the character set your blog is using (ex: utf-8)
<p>Character set: <?php bloginfo('charset'); ?></p>
ブログの説明を表示
あなたのブロッグのためにOptions設定における管理パネルに設定されるように結びの文句を表示します。
⇒Displays Tagline for your blog as set in the Administration panel under
<p><?php bloginfo('description'); ?></p>
bloginfoのパラメーター
show
(string) あなたのブロッグに関する情報の詳細。 有効値:
- ‘name’ – 一般オプションで設定したウェブブログタイトル名(Default)
- ‘description’ – Tagline for your blog; set in General Options.
- ‘url’ – URL for your blog’s web site address.
- ‘rdf_url’ – URL for RDF/RSS 1.0 feed.
- ‘rss_url’ – URL for RSS 0.92 feed.
- ‘rss2_url’ – URL for RSS 2.0 feed.
- ‘atom_url’ – URL for Atom feed.
- ‘comments_rss2_url’ – URL for comments RSS 2.0 feed.
- ‘pingback_url’ – URL for Pingback (XML-RPC file).
- ‘admin_email’ – Administrator’s email address; set in General Options.
- ‘charset’ – Character encoding for your blog; set in Reading Options.
- ‘version’ – Version of WordPress your blog uses.
⇒(string) Informational detail about your blog. Valid values:
- ‘name’ – Weblog title; set in General Options. (Default)
- ‘description’ – Tagline for your blog; set in General Options.
- ‘url’ – URL for your blog’s web site address.
- ‘rdf_url’ – URL for RDF/RSS 1.0 feed.
- ‘rss_url’ – URL for RSS 0.92 feed.
- ‘rss2_url’ – URL for RSS 2.0 feed.
- ‘atom_url’ – URL for Atom feed.
- ‘comments_rss2_url’ – URL for comments RSS 2.0 feed.
- ‘pingback_url’ – URL for Pingback (XML-RPC file).
- ‘admin_email’ – Administrator’s email address; set in General Options.
- ‘charset’ – Character encoding for your blog; set in Reading Options.
- ‘version’ – Version of WordPress your blog uses.
WordPressバージョン1.5以降で動作します。
- ‘html_type’ – “Content-type” for your blog.
- ‘wpurl’ – URL for WordPress installation.
- ‘template_url’ – URL for template in use.
- ‘template_directory’ – URL for template’s directory.
- ’stylesheet_url’ – URL for primary CSS file. Returns: http//example.com/wp-content/themes/ + your-active-theme-name(value from wp_options, “stylesheet” row) + “/style.css”(hardcoded in functions.php)
- ’stylesheet_directory’ – URL for stylesheet directory. (Deprecated in 2.3.1)
⇒The following work in WordPress version 1.5 or after:
- ‘html_type’ – “Content-type” for your blog.
- ‘wpurl’ – URL for WordPress installation.
- ‘template_url’ – URL for template in use.
- ‘template_directory’ – URL for template’s directory.
- ’stylesheet_url’ – URL for primary CSS file. Returns: http//example.com/wp-content/themes/ + your-active-theme-name(value from wp_options, “stylesheet” row) + “/style.css”(hardcoded in functions.php)
- ’stylesheet_directory’ – URL for stylesheet directory. (Deprecated in 2.3.1)
関連テンプレートタグ
bloginfo, bloginfo_rss, get_bloginfo, get_bloginfo_rss, wp_title, get_archives, wp_get_archives, get_calendar, get_posts, wp_list_pages, wp_dropdown_pages, wp_loginout, wp_register, query_posts, rss_enclosure
関連記事







