bloginfo

Sponsored Link

ブログについての情報を表示し、WordPress管理パネルからユーザープロフィールと一般的なオプションを提供する情報からほとんど集められます。

それはページのどのテンプレート内でも使用することができます。これは、常にブラウザに結果を出力します。PHPで使用するための値が必要な場合、get_bloginfo()を使用します。

Sponsored Link

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

ブログタイトルを表示

タグでブログのタイトルを表示します。

Displays your blog’s title in a

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>

ブログの説明を表示

ブログの管理パネルの下で設定されたブログのためにキャッチフレーズを表示します。

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

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

bloginfoのパラメーター

そのディレクトリのURLは、末尾のスラッシュ不足している注意してください。

親として親テーマを持つチャイルドテーマを使うこと:

原文(翻訳元)Note that directory URLs are missing trailing slashes.

Using child-theme, that has parent-theme as the parent:

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 = 2.9.2

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.

関連テンプレートタグ

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

Sponsored Link