the_title

Sponsored Link

現在の記事のタイトルを表示します。 Loopの中にこのタグはあるに違いありません。

Sponsored Link

Displays or returns the title of the current post. This tag must be within The Loop.

the_titleのテンプレートタグ使用方法

<?php the_title( $before, $after, $display ); ?> 

the_titleのパラメーター

$before

(string)テキストはタイトルの前に配置します。デフォルトは、”。

(string) Text to place before the title. Defaults to ”.

$after

(string)テキストはタイトルの後に配置します。デフォルトは、”。

(string) Text to place after the title. Defaults to ”.

$display

(Boolean)タイトル(TRUE)を表示します。またはPHP(FALSE)で使用するためにそれを返します。デフォルトは、TRUE。

(Boolean) Display the title (TRUE) or return it for use in PHP (FALSE). Defaults to TRUE.

<?php the_title('<h3>', '</h3>'); ?>

注釈

参照:the_title_attribute() , get_the_title()

See also: the_title_attribute() , get_the_title()

変更ログ

Since: 0.71

ソースファイル

the_title()は、wp-includes/post-template.php内に位置しています。

the_title() is located in wp-includes/post-template.php.

関連テンプレートタグ

the_ID, the_title, the_title_attribute, single_post_title, the_title_rss, the_content, the_content_rss, the_excerpt, the_excerpt_rss, wp_link_pages, next_post_link, next_posts_link, previous_post_link, previous_posts_link, posts_nav_link, sticky_class, the_meta

Sponsored Link