WordPress:Template Tags/get links list

来自站长百科
Xxf3325讨论 | 贡献2008年6月27日 (五) 10:29的版本 (新页面: {{Deprecated}} == Description == Displays a nested HTML unordered list of all links as defined in the WordPress:Links Manager, sorted under [[WordPress:Li...)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航、​ 搜索

模板:Deprecated

Description

Displays a nested HTML unordered list of all links as defined in the WordPress:Links Manager, sorted under Link Category headings. Note: the Link Category headings are automatically generated inside of <h2> headings.

Note: This tag does not respect the "Before Link", "Between Link and Description", and "After Link" settings defined for Link Categories in the WordPress:Links Manager, Formatting (but respect Category Options, Show, Description). To get around this feature/limitation, see Example 2 from wp_get_links().

Replace With

wp_list_bookmarks().

Usage

%%% <?php get_links_list('order'); ?> %%%

Example

Display links sorted by Link Category ID.

<?php get_links_list('id'); ?> 

Automatically generates the <li> with an ID of the Link Category wrapped in an <h2> heading. It looks like this (links edited for space):

<li id="linkcat-1"><h2>Blogroll</h2>
   <ul>
      <li><a href="http://example1.com/">Blogroll Link 1</a></li>
      <li><a href="http://example2.com/">Blogroll Link 2</a></li>
      <li><a href="http://example3.com/">Blogroll Link 3</a></li>
    </ul>
</li>

Parameters

order
(string) Value to sort Link Categories by. Valid values:
  • 'name' (Default)
  • 'id'
Prefixing the above options with an underscore (ex: '_id') sorts links in reverse order.

Related

模板:Tag Link Manager Tags

模板:PHP Function Tag Footer