get_home_template

Sponsored Link

現在あるいは親テンプレート内のホームテンプレートのパスを取得します。

最初に’index.php’にフォールバックする前に’home.php’の検索を試みます。

Sponsored Link

Retrieve path of home template in current or parent template.

Attempts to locate ‘home.php’ first before falling back to ‘index.php’.

get_home_templateのファンクションタグ使用方法

<?php get_home_template() ?>

get_home_templateのパラメーター

None.

戻り値

(string)
現在あるいは親テンプレート内のホームテンプレートのパスを取得します。

(string)
Returns path of home template in current or parent template.

注釈

  • Uses: apply_filters() Calls ‘home_template’ on file path of home template.
  • Uses: locate_template() on ‘home.php’ and ‘index.php’.

変更ログ

Since: 1.5.0

ソースファイル

get_home_template() is located in wp-includes/theme.php.

Sponsored Link