- 赤色のリンクは、まだ日本語Codexに存在しないページ・画像です。英語版と併せてご覧ください。(詳細)
「テンプレートタグ/wp nav menu」の版間の差分
提供: WordPress Codex 日本語版
< テンプレートタグ
細 (リンク調整、テンプレートタグガイド等挿入/未翻訳) |
({{原文|Function Reference/wp_nav_menu|85236}}<!-- 22:13, 2 April 2010 Morganestes 版 -->原文更新を反映) |
||
1行目: | 1行目: | ||
{{NeedTrans}} | {{NeedTrans}} | ||
{{テンプレートタグガイド|クエリ}}<!-- 試験的に挿入 --> | {{テンプレートタグガイド|クエリ}}<!-- 試験的に挿入 --> | ||
+ | {{Languages| | ||
+ | {{en|Function Reference/wp_nav_menu}} | ||
+ | {{ja|テンプレートタグ/wp_nav_menu}} | ||
+ | }} | ||
== Description == | == Description == | ||
− | Display a navigation menu. Menus can be created from the backend: [[ | + | Display a navigation menu. Menus can be created from the backend: [[Administration Panels#Appearance|Appearance]] > [[Appearance Menus SubPanel|Menus]]. |
== Usage == | == Usage == | ||
− | + | %%% <?php wp_nav_menu($args); ?> %%% | |
== Parameters == | == Parameters == | ||
17行目: | 21行目: | ||
{{Parameter|$container|string|Parent element of the menu|optional|div}} | {{Parameter|$container|string|Parent element of the menu|optional|div}} | ||
{{Parameter|$container_class|string|The parent element class|optional|blank}} | {{Parameter|$container_class|string|The parent element class|optional|blank}} | ||
− | {{Parameter|$menu_class|string|The menu class|optional| | + | {{Parameter|$menu_class|string|The menu class|optional|menu}} |
− | {{Parameter|$format|string|Whether to format the ul|optional| | + | {{Parameter|$format|string|Whether to format the ul|optional|div}}(?)- this is in the function documentation, but doesn't exist in the $defaults array |
{{Parameter|$fallback_cb|string|If the menu doesn't exists, a callback function will fire|optional|wp_page_menu}} | {{Parameter|$fallback_cb|string|If the menu doesn't exists, a callback function will fire|optional|wp_page_menu}} | ||
− | {{Parameter|$ | + | {{Parameter|$link_before|string|Output text before the link|optional}} |
− | {{Parameter|$ | + | {{Parameter|$link_after|string|Output text after the link|optional}} |
− | {{Parameter|$ | + | {{Parameter|$before|string|Output text before the link text|optional}} |
− | {{Parameter|$ | + | {{Parameter|$after|string|Output text after the link text|optional}} |
{{Parameter|$echo|boolean|Whether to echo the menu or return it|optional|true}} | {{Parameter|$echo|boolean|Whether to echo the menu or return it|optional|true}} | ||
32行目: | 36行目: | ||
</div></pre> | </div></pre> | ||
− | == | + | == Change log == |
Since [[Version 3.0|3.0]] | Since [[Version 3.0|3.0]] | ||
38行目: | 42行目: | ||
== Source file == | == Source file == | ||
− | <tt>wp_nav_menu()</tt> is located in {{ | + | <tt>wp_nav_menu()</tt> is located in {{Trac|wp-includes/nav-menu-template.php}}. |
== Related == | == Related == | ||
− | |||
+ | {{原文|Function Reference/wp_nav_menu|85236}}<!-- 22:13, 2 April 2010 Morganestes 版 --> | ||
{{Tag Footer}} | {{Tag Footer}} | ||
49行目: | 53行目: | ||
[[Category:テンプレートタグ]] | [[Category:テンプレートタグ]] | ||
[[Category:wp3.0]] | [[Category:wp3.0]] | ||
+ | [[Category:New page created]] | ||
+ | |||
[[en:Function Reference/wp_nav_menu]] | [[en:Function Reference/wp_nav_menu]] |
2010年4月21日 (水) 07:32時点における版
このページ「テンプレートタグ/wp nav menu」は未翻訳です。和訳や日本語情報を加筆してくださる協力者を求めています。
タグ一覧: テンプレートタグ | インクルードタグ | 条件分岐タグ | その他の関数 | Code Reference
使い方: テンプレートタグ入門 | パラメータの渡し方 | 初心者の方へ | その他のテーマ関連資料
[http://wpdocs.sourceforge.jp{{localurl: テンプレート:en テンプレート:ja }} 日本語] •
Description
Display a navigation menu. Menus can be created from the backend: Appearance > Menus.
Usage
%%% <?php wp_nav_menu($args); ?> %%%
Parameters
- $id
- (integer) (optional) The menu id.
- 初期値: blank
- $slug
- (string) (optional) The menu slug
- 初期値: blank
- $menu
- (string) (optional) The menu name
- 初期値: blank
- $container
- (string) (optional) Parent element of the menu
- 初期値: div
- $container_class
- (string) (optional) The parent element class
- 初期値: blank
- $menu_class
- (string) (optional) The menu class
- 初期値: menu
- $format
- (string) (optional) Whether to format the ul
- 初期値: div(?)- this is in the function documentation, but doesn't exist in the $defaults array
- $fallback_cb
- (string) (optional) If the menu doesn't exists, a callback function will fire
- 初期値: wp_page_menu
- $link_before
- (string) (optional) Output text before the link
- 初期値: なし
- $link_after
- (string) (optional) Output text after the link
- 初期値: なし
- $before
- (string) (optional) Output text before the link text
- 初期値: なし
- $after
- (string) (optional) Output text after the link text
- 初期値: なし
- $echo
- (boolean) (optional) Whether to echo the menu or return it
- 初期値: true
Examples
<div class="access"> <?php wp_nav_menu(); ?> </div>
Change log
Since 3.0
Source file
wp_nav_menu() is located in wp-includes/nav-menu-template.php
.
Related
最新英語版: WordPress Codex » Function Reference/wp_nav_menu (最新版との差分)
関数リファレンス、テンプレートタグ目次もご覧ください。