- 赤色のリンクは、まだ日本語Codexに存在しないページ・画像です。英語版と併せてご覧ください。(詳細)
テンプレートタグ/home url
提供: WordPress Codex 日本語版
< テンプレートタグ
2010年7月6日 (火) 00:50時点におけるBono (トーク | 投稿記録)による版 (en:Template Tags/home_url 14:05, 5 July 2010 Bono 版を翻訳用にコピー)
目次
Description
The home_url template tag retrieves the home url for the current site. Returns the 'home' option with the appropriate protocol, 'https' if is_ssl() and 'http' otherwise. If scheme is 'http' or 'https', is_ssl() is overridden.
Use the get_home_url tag to retrieve the url of the site specified.
Usage
%%%<?php home_url( 'path', 'scheme' ); ?>%%%
Default Usage
%%%<?php home_url(); ?>%%%
Parameters
- path
- (string) (optional) Path relative to the home url.
- 初期値: なし
- scheme
- (string) (optional) Scheme to give the home url context. Currently 'http','https'.
- 初期値: null
Return
(string) Home url link with optional path appended.
Examples
Changelog
- 3.0.0 : New template tag.
Source Code
home_url()
is located in
-
wp-includes/link-template.php
(5.3) -
構文エラー: "trunk" は認識できません/src/wp-includes/link-template.php wp-includes/link-template.php
(the development version)
最新英語版: WordPress Codex » Function Reference/home url (最新版との差分)
Related
関数リファレンス、テンプレートタグ目次もご覧ください。