• サイトデザイン工事中です。ご意見をお寄せください
  • 赤色のリンクは、まだ日本語Codexに存在しないページ・画像です。英語版と併せてご覧ください。(詳細

このWikiはいつでも誰でも編集できます

テンプレートタグ/get home url

提供:WordPress Codex 日本語版
移動: 案内, 検索

このページ「テンプレートタグ/get home url」は未翻訳です。和訳や日本語情報を加筆してくださる協力者を求めています

情報募集中 このテンプレートタグの説明やコードの書き方、活用例参考になるページがあったら、他のWordPressユーザのためにどんどん書き込みましょう! 該当部分を編集するか、このページのノートまたはフォーラム等で教えてください。

目次

Description

The get_home_url template tag retrieves the home url for a given site. Returns the 'home' option with the appropriate protocol, 'https' if is_ssl()/en and 'http' otherwise. If scheme is 'http' or 'https', is_ssl() is overridden.

Usage

<?php get_home_url( $blog_id, 'path', 'scheme' ); ?>

Default Usage

<?php get_home_url(); ?>

Parameters

blog_id
integer) (optional) Blog ID.
初期値: null (the current blog)
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.

Hooks

apply_filters() Calls 'home_url' hook on home url before returning.

Examples

Changelog

Source Code

get_home_url() is located in wp-includes/link-template.php

このページ「テンプレートタグ/get home url」はまだ書きかけで、情報が不足しています。続きを書いて WordPress を手助けしましょう

最新英語版: WordPress Codex » Template Tags/get_home_url最新版との差分

Related

テンプレート:Link Tags

個人用ツール
名前空間
変種
操作
このサイトについて
特集
サーバ別情報
リファレンス
ドキュメント整備
ツールボックス
他の言語