WordPress:Template Tags/wp get links
来自站长百科
Description
Displays links associated with a numeric link category ID. This tag uses the settings you specify in the WordPress:Links Manager (pre-WordPress 2.1 only). For control over the formatting and display of your links within the tag's parameters, see get_links().
Replace With
wp_list_bookmarks() accepts one or more numeric link categories through the 'category' parameter.
Usage
%%% <?php wp_get_links(category); ?> %%%
Examples
Links by Category Number
Show links for link category 1.
<?php wp_get_links(1); ?>
Include Before and After Text
Mimic the behavior of get_links_list() but do respect the "Before Link", "Between Link and Description", and "After Link" settings defined for Link Categories in the Links Manager.
Parameters
- category
- (integer) The numeric ID of the link category whose links will be displayed. You must select a link category, if none is selected it will generate an error.