Function Reference/wp get links
This function has been deprecated. That means it has been replaced by a new function or is no longer supported, and may be removed from future versions. All code that uses this function should be converted to use its replacement if one exists. See also wp-includes/deprecated.php.
Description
Displays links associated with a numeric link category ID. This tag uses the settings you specify in the 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 ); ?>
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.
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.
Change Log
Related
wp_list_bookmarks,
get_bookmarks,
get_bookmark,
get_bookmark_field