(Add your language)
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
Use any of these functions
Like wp_get_linksbyname(), this tag displays links from the Links Manager, but allows the user to control how they are displayed by tag parameters, rather than through the WordPress admin interface (useful when displaying links on more than one template).
<?php get_linksbyname('cat_name', 'before',
'after', 'between', show_images, 'orderby',
show_description, show_rating, limit,
By default, the tag shows:
- All categories if none are specified
- All category links are shown
- Puts a line break after the link item
- Puts a space between the image and link (if one is included)
- Shows link images if available
- List sorted by ID
- Shows the link description
- Does not show the rating
- With no limit listed, it shows all links
- Does not show the updated timestamp
<?php get_linksbyname(); ?>
Specific Category Sorted by Name
Displays links for link category "Friends" in an unordered list with descriptions on the next line, sorts by link name.
<?php get_linksbyname('Friends', '<li>', '</li>', '<br />', FALSE,
'name', TRUE); ?>
With Images and Ratings, No Descriptions
Displays all links one per line without descriptions, uses images for links, sorts by link name, and shows ratings.
<?php get_linksbyname('', '', '<br />', '', TRUE, 'name', FALSE, TRUE); ?>
As a Definition List with Images and Descriptions in Separate Tags
Displays all links in a Definition List, places linked images in the <dt>, descriptions in the <dd>, and sorts by rating but doesn't show it.
<?php get_linksbyname('Portfolio', '<dt>',
'</dd>','</dt><dd>', TRUE, 'rating',
TRUE, FALSE, -1, FALSE); ?>
To see examples of styling this markup in a fluid/elastic, multi-column layout with backgrounds and hover effects, please see Manipulating Definition Lists for Fun and Profit.
- (string) The name of the link category whose links will be displayed. If none is specified, all links are shown. Defaults to 'noname' (all links).
- (string) Text to place before each link. There is no default.
- (string) Text to place after each link. Defaults to '<br />'.
- (string) Text to place between each link/image and its description. Defaults to ' ' (space).
- (boolean) Should images for links be shown (TRUE) or not (FALSE). Defaults to TRUE.
- (string) Value to sort links on. Defaults to 'id'. Valid options:
- 'owner' - User who added link through Links Manager.
- 'rel' - Link relationship (XFN).
- 'length' - The length of the link name, shortest to longest.
- Prefixing any of the above options with an underscore (ex: '_id') sorts links in reverse order.
- 'rand' - Display links in random order.
- (boolean) Display the description (TRUE) or not (FALSE). Valid if show_images is FALSE or an image is not defined. Defaults to TRUE.
- (boolean) Should rating stars/characters be displayed (TRUE) or not (FALSE). Defaults to FALSE.
- (integer) Maximum number of links to display. Defaults to -1 (all links).
- (boolean) Should the last updated timestamp be displayed (TRUE) or not (FALSE). Defaults to FALSE.