WordPress.org

Ready to get started?Download WordPress

Forums

get_links and wp_list_bookmarks() (10 posts)

  1. sfong15
    Member
    Posted 7 years ago #

    My experience going to 2.1 is so far so good except that the good old get_links() doesn't work anymore.

    I read from here there wp_list_bookmarks() is a replacement but this in the codex doesn't get me any far. Isn't there a way that I could display just one category of blogroll as in get_links()?

    My theme is broken until I get round this.

  2. darrenstraight
    Member
    Posted 7 years ago #

    Yeah tell me about it, I really need to display just one category of blogroll.

    I have rolled back though, as not only did I have problems with that but my WYSIWYG Editor was pretty much non-functional, and every time I did go to it, my blog would be set to the default classic theme, arghh!

  3. sfong15
    Member
    Posted 7 years ago #

    I think I have cracked this. Before 2.1 I used <?php get_links('6', '<li>', '</li>', '', FALSE, 'name', FALSE,
    FALSE, -1, FALSE); ?>
    . Now the confusing part of it is that you thought by changing it to wp_list_bookmarks() that may solve the problem after the upgrade, that's wrong. The documentation needs polishing.

    This part in codex needs toughing up there is obvious syntax error there.

    I failed the first time by using wp_list_bookmarks() because I assumed the category id is same as before, i.e. 6 in my case. It didn't work. What you need to do is to go to admin>blogroll and mouse over the category you want to display. You should see what id that is, i.e. ....link-manager.php?cat_id=xxx

    I used the correct category id and that's working for me now, see sidebar of my site at which I have 3 links categories.

    Good luck.

  4. don_ousian
    Member
    Posted 7 years ago #

    That worked for me.
    Categories ids were different.
    Thanks for the solution.

  5. msmeritt
    Member
    Posted 7 years ago #

    I was completely puzzled by this issue, wondering why my Link categories had suddenly been appended to my regular Post Category list and were appearing there in the Category lists for my archives, which just made no sense at all. And I was even more puzzled why my link list pages weren't working.

    I realized I could exclude the link Categories from my category listings using the wp_list_categories exclude tag, and I realized I had to switch the IDs for the get_links functions. All seems set now.

    Except that I don't really see why it was deemed beneficial to make these changes. It certainly didn't benefit me at all to combine the Post and Link categories, it just caused these headaches I had to sort out. At the very least, it would have been nice if there was an obviously publicized place where such changes were outlined so we could have some transparency instead of wandering our way around the support forums.

    Just had to vent somewhere about this :)

  6. Ajd777
    Member
    Posted 7 years ago #

    >>Just had to vent somewhere about this :)
    http://wordpress.org/extend/kvetch/

    I've used that several times myself (although mostly about the code itself).

  7. pierrefitch
    Member
    Posted 7 years ago #

    Were do you add this new code

  8. MajorD
    Member
    Posted 7 years ago #

    @sfong15 - Thanks! your code fixed the issue I was having!

    @pierrefitch - depending on your theme, the code would be located in the header.php, sidebar.php, or some other file that the theme author created to house your links/bookmarks.

    Play with header.php and sidebar.php (after copying sfong15's code and also following his instructions) and see what happens within your layout.

  9. JoMilla
    Member
    Posted 7 years ago #

    I cant get rid of the 'bookmarks' header. anyone?

  10. lisaps
    Member
    Posted 6 years ago #

    I can't either and mine says "Blogroll" instead of "Bookmarks" for some reason -- even though bookmark-template.php says it should say "Bookmarks."

Topic Closed

This topic has been closed to new replies.

About this Topic