WordPress is using three main functions to list links:

  • <?php wp_get_links(category); ?> displays links assigned to category which ID is stated within function. So <?php wp_get_links(5); ?> will show all links from category with ID #5.
  • <?php get_links_list('order'); ?> displays links sorted by link category ID or name
  • <?php get_links(category, 'before', 'after', 'between', show_images, 'order', show_description, show_rating, limit, show_updated, echo); ?> has the widest range of parameters. It also sorts links according to their category ID but offers much more features.

I wanted to create links lists which would allowed me to display two categories (’How To’ and ‘Everything About’) in the sidebar and the third category (’Plugins’) on a separate page.

Links in sidebar are pulled by <ul><?php get_links_list('name'); ?></ul> . That gives a list of ALL links which wasn’t my idea. I ‘ve tried to use <ul><?php wp_get_links('12'); ?></ul> and I got list of links from pointed category but bullets assigned to unordered list were missing ;) . Finally I’ve put <ul><?php get_links('12', '<li>', '</li>'); ?></ul> function which allowed me to display all links from one category as an unordered list. I repeated that function with the other ID number to list links from the second category.

Now only page left. NigaRila theme has built-in page-links.php template.
It’s main part looks like that:

<div class="post">
<h2 class="post-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<p class="post-info">Created on <em><?php the_time('M d Y'); ?></em> <?php edit_post_link(); ?></p>
<div><ul><?php get_links_list('name'); ?></ul></div>
</div>

That also gives a list of ALL links. And there is no plain text being displayed!
First of all I replaced content with the one from regular page which includes displaying posts (if there are any) with author and date info as well as the comment template and page navigation. And then I replaced
<div><ul><?php get_links_list('name'); ?></ul></div>
with
<ul><?php get_links('5', '<li>', '</li>', ' &raquo; '); ?></ul>.
This function allowed me to display ALL links from category ‘Plugins’ as an unordered list with special character » between link and its description.
And now I have it exactly I wanted :D .