- 赤色のリンクは、まだ日本語Codexに存在しないページ・画像です。英語版と併せてご覧ください。(詳細)
「テンプレートタグ/wp list bookmarks」の版間の差分
(→パラメータ) |
|||
1行目: | 1行目: | ||
− | |||
− | |||
− | |||
<div id="Description"> | <div id="Description"> | ||
== 説明 == | == 説明 == | ||
− | </div> | + | </div> |
− | この関数は [[ | + | この関数は[[管理画面]] > [[管理パネル/リンク|リンク]] パネルにあるブックマークを表示するものです。この[[Template Tags|テンプレートタグ]]はブックマークの配列と表示をコントロールさせるものです。 |
− | + | ||
+ | '''NOTE''': [[Template_Tags/get_links_list|get_links_list()]] と [[Template_Tags/get_links|get_links()]] が非推奨となり、 '''wp_list_bookmarks()''' が後継となりました。 | ||
<div id="Usage"> | <div id="Usage"> | ||
== 使い方 == | == 使い方 == | ||
</div> | </div> | ||
+ | <?php wp_list_bookmarks( $args ); ?> | ||
− | + | <div id="Default_Usage"> | |
− | + | === 初期設定での使い方 === | |
− | <div id=" | + | |
− | == | + | |
</div> | </div> | ||
+ | <pre><?php $args = array( | ||
+ | 'orderby' => 'name', | ||
+ | 'order' => 'ASC', | ||
+ | 'limit' => -1, | ||
+ | 'category' => ' ', | ||
+ | 'exclude_category' => ' ', | ||
+ | 'category_name' => ' ', | ||
+ | 'hide_invisible' => 1, | ||
+ | 'show_updated' => 0, | ||
+ | 'echo' => 1, | ||
+ | 'categorize' => 1, | ||
+ | 'title_li' => __('Bookmarks'), | ||
+ | 'title_before' => '<h2>', | ||
+ | 'title_after' => '</h2>', | ||
+ | 'category_orderby' => 'name', | ||
+ | 'category_order' => 'ASC', | ||
+ | 'class' => 'linkcat', | ||
+ | 'category_before' => '<li id=%id class=%class>', | ||
+ | 'category_after' => '</li>' ); ?> </pre> | ||
− | <div id=" | + | By default, the function shows: |
− | == | + | * Bookmarks divided into Categories with a Category name heading |
+ | * All bookmarks included, regardless of Category Name or Category ID | ||
+ | * Sorts the list by name | ||
+ | * An image if one is included | ||
+ | * A space between the image and the text | ||
+ | * Shows the description of the bookmark | ||
+ | * Does not show the ratings | ||
+ | * Unless limit is set, shows all bookmarks | ||
+ | * Displays bookmarks | ||
+ | |||
+ | <div id="Parameters"> | ||
+ | == パラメータ == | ||
</div> | </div> | ||
− | + | ; categorize : (''boolean'') Bookmarks should be shown within their assigned Categories or not. | |
− | + | :* <tt>1</tt> (True) - Default | |
− | ' | + | :* <tt>0</tt> (False) |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | ) | + | |
− | + | ; category : (''string'') Comma separated list of numeric Category IDs to be displayed. If none is specified, all Categories with bookmarks are shown. Defaults to <tt>''</tt> (all Categories). | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ; exclude_category : (''string'') Comma separated list of numeric Category IDs to be excluded from display. Defaults to <tt>''</tt> (no categories excluded). | |
+ | ; category_name : (''string'') The name of a Category whose bookmarks will be displayed. If none is specified, all Categories with bookmarks are shown. Defaults to <tt>''</tt> (all Categories). | ||
+ | |||
+ | ; category_before : (''string'') Text to place before each category. Defaults to <tt>'<li id="[category id]" class="linkcat">'</tt> . | ||
+ | |||
+ | ; category_after : (''string'') Text to place after each category. Defaults to <tt>'</li>'</tt> . | ||
+ | |||
+ | ; class : (''string'') The class each category li will have on it. Defaults to <tt>'linkcat'</tt> . (This parameter was added with [[Version 2.2]]) | ||
+ | |||
+ | ; category_orderby : (''string'') Value to sort Categories on. Valid options: | ||
+ | :* <tt>'name'</tt> - Default | ||
+ | :* <tt>'id'</tt> | ||
+ | :* <tt>'slug'</tt> | ||
+ | :* <tt>'count'</tt> | ||
+ | :* <tt>'term_group'</tt> (not used yet) | ||
+ | |||
+ | ; category_order : (''string'') Sort order, ascending or descending for the category_orderby parameter. Valid values: | ||
+ | :* <tt>ASC</tt> - Default | ||
+ | :* <tt>DESC</tt> | ||
+ | |||
+ | ; title_li : (''string'') Text for the heading of the links list. Defaults to <tt>'__('Bookmarks')'</tt>, which displays "Bookmarks" (the <tt>__('')</tt> is used for [[Localization|localization purposes]]). Only used when categorize are set to 0 [false] (else the category names will be used instead). If 'title_li' is set to null (0) value, no heading is displayed, and the list will not be wrapped with <tt><ul>, </ul></tt> tags (be sure to pass the categorize option to 0 [false] to this option takes effect). | ||
+ | |||
+ | ; title_before : (''string'') Text to place before each Category description if 'categorize' is 1 [true], or text defined in "title_li" if 'categorize' is 0 [false]. Defaults to <tt>'<h2>'</tt>. | ||
+ | |||
+ | ; title_after : (''string'') Text to place after each Category description if 'categorize' is 1 [true], or text defined in "title_li" if 'categorize' is 0 [false]. Defaults to <tt>'</h2>'</tt>. | ||
+ | |||
+ | ; show_private : (''boolean'') Should a Category be displayed even if the Category is considered private. Ignore the admin setting and show private Categories (<tt>TRUE</tt>) or do NOT show private Categories (<tt>FALSE</tt>). | ||
+ | :* <tt>1</tt> (True) | ||
+ | :* <tt>0</tt> (False) - Default | ||
+ | |||
+ | ; include : (''string'') Comma separated list of numeric bookmark IDs to include in the output. For example, 'include=1,3,6' means to return or echo bookmark IDs 1, 3, and 6. If the include string is used, the ''category'', ''category_name'', and ''exclude'' parameters are ignored. Defaults to <tt>''</tt> (all Bookmarks). | ||
+ | |||
+ | ; exclude : (''string'') Comma separated list of numeric bookmark IDs to exclude. For example, 'exclude=4,12' means that bookmark IDs 4 and 12 will NOT be returned or echoed. Defaults to <tt>''</tt> (exclude nothing). | ||
+ | |||
+ | ; orderby : (''string'') Value to sort bookmarks on. This can be a COMMA separated list of values. Defaults to <tt>'name'</tt> unless you pass the value of <tt>''</tt> (empty), in which case it sets to <tt>'id'</tt>. Valid options: | ||
+ | :* <tt>'id' (use 'link_id' with WP 3.2 and later)</tt> | ||
+ | :* <tt>'url'</tt> | ||
+ | :* <tt>'name'</tt> - Default | ||
+ | :* <tt>'target'</tt> | ||
+ | :* <tt>'description'</tt> | ||
+ | :* <tt>'owner'</tt> - User who added bookmark through bookmarks Manager. | ||
+ | :* <tt>'rating'</tt> | ||
+ | :* <tt>'updated'</tt> Note: the link_updated field does not track local modifications. It tracks when whatever the link points to is updated via remote requests to pingomatic. | ||
+ | :* <tt>'rel'</tt> - bookmark relationship (XFN). | ||
+ | :* <tt>'notes'</tt> | ||
+ | :* <tt>'rss'</tt> | ||
+ | :* <tt>'length'</tt> - The length of the bookmark name, shortest to longest. | ||
+ | :* <tt>'rand'</tt> - Display bookmarks in random order. | ||
+ | |||
+ | ; order : (''string'') Bookmarks display sorting order, ascending or descending as defined in the 'orderby' parameter. Valid values: | ||
+ | :* <tt>ASC</tt> - Default | ||
+ | :* <tt>DESC</tt> | ||
+ | |||
+ | ; limit : (''integer'') Maximum number of bookmarks to display. Default is <tt>-1</tt> (all bookmarks). | ||
+ | |||
+ | ; before : (''string'') Text to place before each bookmark. Defaults to <tt>'<li>'</tt>. | ||
+ | |||
+ | ; after : (''string'') Text to place after each bookmark. Defaults to <tt>'</li>'</tt>. | ||
+ | |||
+ | ;link_before : (''string'') Text to place before the text of each bookmark, inside the hyperlink code. There is no set default. (This parameter was added with [[Version 2.7]]) | ||
+ | |||
+ | ;link_after : (''string'') Text to place after the text of each bookmark. There is no set default. (This parameter was added with [[Version 2.7]]) | ||
+ | |||
+ | ; between : (''string'') Text to place between each bookmark/image and its description. Defaults to <tt>'\n'</tt> (newline). | ||
+ | |||
+ | ; show_images : (''boolean'') Should images for bookmarks be shown (<tt>TRUE</tt>) or not (<tt>FALSE</tt>). | ||
+ | :* <tt>1</tt> (True) - Default | ||
+ | :* <tt>0</tt> (False) | ||
+ | |||
+ | ; show_description : (''boolean'') Should the description be displayed (<tt>TRUE</tt>) or not (<tt>FALSE</tt>). Valid when '''show_images''' is <tt>FALSE</tt>, or an image is not defined. | ||
+ | :* <tt>1</tt> (True) | ||
+ | :* <tt>0</tt> (False) - Default | ||
+ | |||
+ | ; show_name : (''boolean'') Displays the text of a link when (<tt>TRUE</tt>). Works when '''show_images''' is <tt>TRUE</tt>. (This parameter was added with [[Version 2.7]]) | ||
+ | :* <tt>1</tt> (True) | ||
+ | :* <tt>0</tt> (False) - Default | ||
+ | |||
+ | ; show_rating : (''boolean'') Should rating stars/characters be displayed (<tt>TRUE</tt>) or not (<tt>FALSE</tt>). | ||
+ | :* <tt>1</tt> (True) | ||
+ | :* <tt>0</tt> (False) - Default | ||
+ | |||
+ | ; show_updated : (''boolean'') Should the last updated timestamp be displayed (<tt>TRUE</tt>) or not (<tt>FALSE</tt>). Note that link_updated does not track local modifications. It tracks when whatever the link points to is updated via remote requests to pingomatic. | ||
+ | :* <tt>1</tt> (True) | ||
+ | :* <tt>0</tt> (False) - Default | ||
+ | |||
+ | ; hide_invisible : (''boolean'') Should bookmark be displayed even if it's Visible setting is No. Abides by admin setting (<tt>TRUE</tt>) or does no abide by admin setting (<tt>FALSE</tt>). | ||
+ | :* <tt>1</tt> (True) - Default | ||
+ | :* <tt>0</tt> (False) | ||
+ | |||
+ | ; echo : (''boolean'') Display bookmarks (<tt>TRUE</tt>) or return them for use by PHP (<tt>FALSE</tt>). | ||
+ | :* <tt>1</tt> (True) - Default | ||
+ | :* <tt>0</tt> (False) | ||
+ | |||
+ | <div id="Examples"> | ||
+ | == 使用例 == | ||
+ | </div> | ||
<div id="Simple_List"> | <div id="Simple_List"> | ||
− | === | + | === シンプルリスト === |
</div> | </div> | ||
Displays all bookmarks with the title "Bookmarks" and with items wrapped in <li> tags. The title is wrapped in h2 tags. | Displays all bookmarks with the title "Bookmarks" and with items wrapped in <li> tags. The title is wrapped in h2 tags. | ||
64行目: | 159行目: | ||
<div id="Simple_List_without_the_Heading"> | <div id="Simple_List_without_the_Heading"> | ||
− | === | + | === ヘディングなしのシンプルリスト === |
</div> | </div> | ||
Displays all bookmarks as above, but does not include the default heading. | Displays all bookmarks as above, but does not include the default heading. | ||
<?php wp_list_bookmarks('title_li=&categorize=0'); ?> | <?php wp_list_bookmarks('title_li=&categorize=0'); ?> | ||
+ | |||
+ | === Specific Category Sorted by URL === | ||
<div id="Specific_Category_Sorted_by_URL"> | <div id="Specific_Category_Sorted_by_URL"> | ||
− | === | + | === URL でソートされた特定のカテゴリー === |
</div> | </div> | ||
− | + | Displays bookmarks for Category ID 2 in span tags, uses images for bookmarks, does not show descriptions, sorts by bookmark URL. | |
− | + | <?php wp_list_bookmarks('categorize=0&category=2&before=<span>&after=</span>&show_images=1&show_description=0&orderby=url'); ?> | |
− | <?php wp_list_bookmarks('categorize=0&category=2&before= | + | |
− | + | ||
− | <div id=" | + | <div id="Shows Ratings and Timestamp"> |
=== 評価とタイムスタンプを表示 === | === 評価とタイムスタンプを表示 === | ||
</div> | </div> | ||
− | + | Displays all bookmarks in an ordered list with descriptions on a new line, does not use images for bookmarks, sorts by bookmark id, shows ratings and last-updated timestamp (Note that the last updated timestamp does not track local modifications. It tracks when whatever the link points to is updated via remote requests to pingomatic.) | |
− | + | <ol> | |
− | + | <?php wp_list_bookmarks('between=<br />&show_images=0&orderby=id&show_rating=1&show_updated=1'); ?> | |
− | <?php wp_list_bookmarks('between= | + | </ol> |
− | + | ||
− | + | ||
− | <div id=" | + | <div id="Replaces Heading with Image"> |
− | == | + | === ヘディングを画像に置き換え === |
</div> | </div> | ||
− | + | Uses an image from the theme folder instead of plain text. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | == | + | <?php wp_list_bookmarks('categorize=0&title_before=&title_after=&title_li=<img src="'.get_bloginfo("stylesheet_directory").'/images/blogroll.gif" alt="blogroll" />'); ?> |
− | * [[Version 2.7|2.7]] : | + | |
− | * [[Version 2.1|2.1]] | + | <div id="Change Log"> |
+ | == 改訂履歴 == | ||
+ | </div> | ||
+ | * [[Version 2.7|2.7.0]] : Added the <code>link_before</code>, <code>link_after</code> and <code>show_name</code> parameters. | ||
+ | * [[Version 2.2|2.2.0]] : Added the <code>class</code> parameter. | ||
+ | * Since: [[Version 2.1|2.1.0]] | ||
+ | |||
+ | <div id="Source File"> | ||
+ | == ソースファイル == | ||
+ | </div> | ||
+ | <tt>wp_list_bookmarks()</tt> は {{Trac|wp-includes/bookmark-template.php}} にあります。 | ||
<div id="Related"> | <div id="Related"> | ||
− | == | + | == 関連項目 == |
</div> | </div> | ||
− | {{ | + | {{原文|Function Reference/wp list bookmarks|141103}}<!-- 22:01, February 8, 2014 Djkaz 版 --> |
+ | |||
− | {{ | + | {{Bookmark Tags}} |
− | {{ | + | {{Lists Tags}} |
− | {{ | + | {{Tag Footer}} |
− | + | ||
− | + | ||
− | [[ | + | [[Category:Template Tags]] |
2014年2月8日 (土) 22:16時点における版
目次
説明
この関数は管理画面 > リンク パネルにあるブックマークを表示するものです。このテンプレートタグはブックマークの配列と表示をコントロールさせるものです。
NOTE: get_links_list() と get_links() が非推奨となり、 wp_list_bookmarks() が後継となりました。
使い方
<?php wp_list_bookmarks( $args ); ?>
初期設定での使い方
<?php $args = array( 'orderby' => 'name', 'order' => 'ASC', 'limit' => -1, 'category' => ' ', 'exclude_category' => ' ', 'category_name' => ' ', 'hide_invisible' => 1, 'show_updated' => 0, 'echo' => 1, 'categorize' => 1, 'title_li' => __('Bookmarks'), 'title_before' => '<h2>', 'title_after' => '</h2>', 'category_orderby' => 'name', 'category_order' => 'ASC', 'class' => 'linkcat', 'category_before' => '<li id=%id class=%class>', 'category_after' => '</li>' ); ?>
By default, the function shows:
- Bookmarks divided into Categories with a Category name heading
- All bookmarks included, regardless of Category Name or Category ID
- Sorts the list by name
- An image if one is included
- A space between the image and the text
- Shows the description of the bookmark
- Does not show the ratings
- Unless limit is set, shows all bookmarks
- Displays bookmarks
パラメータ
- categorize
- (boolean) Bookmarks should be shown within their assigned Categories or not.
- 1 (True) - Default
- 0 (False)
- category
- (string) Comma separated list of numeric Category IDs to be displayed. If none is specified, all Categories with bookmarks are shown. Defaults to (all Categories).
- exclude_category
- (string) Comma separated list of numeric Category IDs to be excluded from display. Defaults to (no categories excluded).
- category_name
- (string) The name of a Category whose bookmarks will be displayed. If none is specified, all Categories with bookmarks are shown. Defaults to (all Categories).
- category_before
- (string) Text to place before each category. Defaults to '<li id="[category id]" class="linkcat">' .
- category_after
- (string) Text to place after each category. Defaults to '</li>' .
- class
- (string) The class each category li will have on it. Defaults to 'linkcat' . (This parameter was added with Version 2.2)
- category_orderby
- (string) Value to sort Categories on. Valid options:
- 'name' - Default
- 'id'
- 'slug'
- 'count'
- 'term_group' (not used yet)
- category_order
- (string) Sort order, ascending or descending for the category_orderby parameter. Valid values:
- ASC - Default
- DESC
- title_li
- (string) Text for the heading of the links list. Defaults to '__('Bookmarks')', which displays "Bookmarks" (the __('') is used for localization purposes). Only used when categorize are set to 0 [false] (else the category names will be used instead). If 'title_li' is set to null (0) value, no heading is displayed, and the list will not be wrapped with <ul>, </ul> tags (be sure to pass the categorize option to 0 [false] to this option takes effect).
- title_before
- (string) Text to place before each Category description if 'categorize' is 1 [true], or text defined in "title_li" if 'categorize' is 0 [false]. Defaults to '<h2>'.
- title_after
- (string) Text to place after each Category description if 'categorize' is 1 [true], or text defined in "title_li" if 'categorize' is 0 [false]. Defaults to '</h2>'.
- show_private
- (boolean) Should a Category be displayed even if the Category is considered private. Ignore the admin setting and show private Categories (TRUE) or do NOT show private Categories (FALSE).
- 1 (True)
- 0 (False) - Default
- include
- (string) Comma separated list of numeric bookmark IDs to include in the output. For example, 'include=1,3,6' means to return or echo bookmark IDs 1, 3, and 6. If the include string is used, the category, category_name, and exclude parameters are ignored. Defaults to (all Bookmarks).
- exclude
- (string) Comma separated list of numeric bookmark IDs to exclude. For example, 'exclude=4,12' means that bookmark IDs 4 and 12 will NOT be returned or echoed. Defaults to (exclude nothing).
- orderby
- (string) Value to sort bookmarks on. This can be a COMMA separated list of values. Defaults to 'name' unless you pass the value of '' (empty), in which case it sets to 'id'. Valid options:
- 'id' (use 'link_id' with WP 3.2 and later)
- 'url'
- 'name' - Default
- 'target'
- 'description'
- 'owner' - User who added bookmark through bookmarks Manager.
- 'rating'
- 'updated' Note: the link_updated field does not track local modifications. It tracks when whatever the link points to is updated via remote requests to pingomatic.
- 'rel' - bookmark relationship (XFN).
- 'notes'
- 'rss'
- 'length' - The length of the bookmark name, shortest to longest.
- 'rand' - Display bookmarks in random order.
- order
- (string) Bookmarks display sorting order, ascending or descending as defined in the 'orderby' parameter. Valid values:
- ASC - Default
- DESC
- limit
- (integer) Maximum number of bookmarks to display. Default is -1 (all bookmarks).
- before
- (string) Text to place before each bookmark. Defaults to '<li>'.
- after
- (string) Text to place after each bookmark. Defaults to '</li>'.
- link_before
- (string) Text to place before the text of each bookmark, inside the hyperlink code. There is no set default. (This parameter was added with Version 2.7)
- link_after
- (string) Text to place after the text of each bookmark. There is no set default. (This parameter was added with Version 2.7)
- between
- (string) Text to place between each bookmark/image and its description. Defaults to '\n' (newline).
- show_images
- (boolean) Should images for bookmarks be shown (TRUE) or not (FALSE).
- 1 (True) - Default
- 0 (False)
- show_description
- (boolean) Should the description be displayed (TRUE) or not (FALSE). Valid when show_images is FALSE, or an image is not defined.
- 1 (True)
- 0 (False) - Default
- show_name
- (boolean) Displays the text of a link when (TRUE). Works when show_images is TRUE. (This parameter was added with Version 2.7)
- 1 (True)
- 0 (False) - Default
- show_rating
- (boolean) Should rating stars/characters be displayed (TRUE) or not (FALSE).
- 1 (True)
- 0 (False) - Default
- show_updated
- (boolean) Should the last updated timestamp be displayed (TRUE) or not (FALSE). Note that link_updated does not track local modifications. It tracks when whatever the link points to is updated via remote requests to pingomatic.
- 1 (True)
- 0 (False) - Default
- hide_invisible
- (boolean) Should bookmark be displayed even if it's Visible setting is No. Abides by admin setting (TRUE) or does no abide by admin setting (FALSE).
- 1 (True) - Default
- 0 (False)
- echo
- (boolean) Display bookmarks (TRUE) or return them for use by PHP (FALSE).
- 1 (True) - Default
- 0 (False)
使用例
シンプルリスト
Displays all bookmarks with the title "Bookmarks" and with items wrapped in <li> tags. The title is wrapped in h2 tags.
<?php wp_list_bookmarks('title_li=&category_before=&category_after='); ?>
ヘディングなしのシンプルリスト
Displays all bookmarks as above, but does not include the default heading.
<?php wp_list_bookmarks('title_li=&categorize=0'); ?>
Specific Category Sorted by URL
URL でソートされた特定のカテゴリー
Displays bookmarks for Category ID 2 in span tags, uses images for bookmarks, does not show descriptions, sorts by bookmark URL.
<?php wp_list_bookmarks('categorize=0&category=2&before=<span>&after=</span>&show_images=1&show_description=0&orderby=url'); ?>
評価とタイムスタンプを表示
Displays all bookmarks in an ordered list with descriptions on a new line, does not use images for bookmarks, sorts by bookmark id, shows ratings and last-updated timestamp (Note that the last updated timestamp does not track local modifications. It tracks when whatever the link points to is updated via remote requests to pingomatic.)
<ol> <?php wp_list_bookmarks('between=<br />&show_images=0&orderby=id&show_rating=1&show_updated=1'); ?> </ol>
ヘディングを画像に置き換え
Uses an image from the theme folder instead of plain text.
<?php wp_list_bookmarks('categorize=0&title_before=&title_after=&title_li=<img src="'.get_bloginfo("stylesheet_directory").'/images/blogroll.gif" alt="blogroll" />'); ?>
改訂履歴
- 2.7.0 : Added the
link_before
,link_after
andshow_name
parameters. - 2.2.0 : Added the
class
parameter. - Since: 2.1.0
ソースファイル
wp_list_bookmarks() は wp-includes/bookmark-template.php
にあります。
関連項目
最新英語版: WordPress Codex » Function Reference/wp list bookmarks (最新版との差分)
ブックマークタグ: wp_list_bookmarks, get_bookmarks, get_bookmark get_bookmark_field
リスト・ドロップダウン関数: wp_list_authors(), wp_list_categories(), wp_list_pages(), wp_list_bookmarks(), wp_list_comments(), wp_get_archives(), wp_page_menu(), wp_dropdown_pages(), wp_dropdown_categories(), wp_dropdown_users()