[resolved] Using Get_links (5 posts)

  1. nabitunics
    Posted 9 years ago #


    I have read through post after post after post and haven't found the answer to this question, so I'm sorry if it's been asked before.

    I currently have a box on my sidebar which displays all my links in all my categories using get_links_list('id')

    What I want to do is create two separate boxes, one which displays just categories 2 and 3 and one which displays category 1.

    I have tried and tried and tried and am currently feeling very dumb because, no matter what I try I can't get them to display in exactly the same format as get_links_list('id') including the category name etc.

    I want it to look exactly the same just with my choice of categories.

    Can anyone put me out of my misery and tell me how to do it?


  2. Have you read this?

    Displaying two different categories of links at once is not something get_links can easily do. You may want to resort to a plugin to do this sort of thing.

  3. nabitunics
    Posted 9 years ago #

    Thanks Otto42.

    I had read that article but failed to understand it (possibly too much caffine).

    Let's limit it to just one category.... how do I display just one category and still have it formatted the way get_links_list('id') would format it?


  4. Like this:

    <li id="linkcat-1"><h2>Your Category Name</h2>
    get_links(1, '<li>', '</li>', 'n', FALSE, 'id', FALSE, FALSE, -1, FALSE);

    The "1" after get_links is your category. The rest defines exactly how it displays the link. All the stuff around the get_links call is the HTML to make it look exactly like get_links_list does, although you can change that if you like.

  5. nabitunics
    Posted 9 years ago #

    You are a wonderful, fabulous individual.

    Thank you thank you thank you!

Topic Closed

This topic has been closed to new replies.

About this Topic