Balkhis - Vision For Success

How to organize your wordpress blogroll links?

Dear Readers, I would like to thank you for reading this post. I highly value your feedback and would like to know more about my readers. Follow me on Twitter

I wanted to do this, and there was really no tutorial out there. So I looked into wordpress codex and found this. Basically what I want to do is organize wordpress blogroll into the way that I want. By default it is organized alphabetically. And sometimes it gives you a pain. Specially when your client demands otherwise.

By default your code looks like: <?php wp_list_bookmarks(); ?>

And that is what displays all the links in your sidebar. But what if you are using wordpress as a CMS. You want different links on different pages? Well then all you do is simply make different link categories, and assign a link category to each custom page.

So then you would post a code like: <?php wp_list_bookmarks(‘title_li=&category=2′); ?>

Replace the number above with the category id, and you will get the links sorted by different categories, but that still does not solve my problem. Because links inside the category is still organized alphabetically.

So basically then you would have to use WordPress parameters.

You can have the link in the following orders:

Orderby

- ‘id’
- ‘url’
- ‘name’
- ‘target’
- ‘description’
- ‘owner’ – User who added bookmark through bookmarks Manager.
- ‘rating’
- ‘updated’
- ‘rel’ – bookmark relationship (XFN).
- ‘notes’
- ‘rss’
- ‘length’ – The length of the bookmark name, shortest to longest.
- ‘rand’ – Display bookmarks in random order.

So then you would have to do this:

<?php wp_list_bookmarks(‘title_li=&category=2&orderby=id’); ?>

Now the above will display the oldest id meaning Id 1 first and then on. So by default it is in ascending order. You can change it to Descending order by simply changing the code a bit.

<?php wp_list_bookmarks(‘title_li=&category=2&orderby=id&order=DESC’); ?>

Ok so now all you really have to do is add & and enter the parameter.

This way you can organize your wordpress blogroll the way you like.

Now there are tons of other ways you can organize your blogroll. For example, you skip one category. Or you don’t want one category to be included so you exclude etc etc.

To find those parameters, head over to WordPress Codex

Follow the instructions that I showed you and you would get your wordpress blogrolls organized.



To stay updated with the blog, please consider subscribing to my full feed RSS. You can also subscribe by Email and have new posts sent directly to your inbox. I hate spam as well, so I promise you that you will not be spammed.
Add to Social Bookmarks:
Add this Article to Digg Add this Article to Stumbleupon Add this Article to Del.icio.us Add this Article to Reddit Add this Article to Newsvine Add this Article to Technorati

RSS feed

14 Comments

Comment by Blog for Beginners Subscribed to comments via email
2008-11-29 13:04:09

By the way, Syed. Slightly off-topic: Do you have any idea how to make the category link “nofollow”…?

Yan


Comment by Syed Balkhi
2008-11-29 21:04:29

I have never done this before. If I am correct you are asking for how to make the links pointing to your categories no follow.

http://wordpress.org/support/topic/155906

There is a way that I think will work guaranteed is shown by PBO in there, but the problem with that is if you change core files. Each time you update wordpress it is gone.

Try one of the other plugins mentioned and see if it works. Do let me know.


Comment by Blog for Beginners Subscribed to comments via email
2008-11-30 00:28:45

Thanks for the heads up, Syed. I’ll try the method suggested by PBO and see if it works.. I’ll be back with an update.

Yan

(Comments wont nest below this level)

 
 
 
Comment by Make money
2008-11-29 21:16:58

nice tutorial

I want an automated buying/selling blogroll feature with automated email notifications… possible ! ?


Comment by Syed Balkhi
2008-11-30 09:48:19

I don’t understand exactly what you are looking for. You would need to give more details here…


 
 
Comment by Klajdi Hena
2008-11-30 15:20:59

Really nice tutorial Syed. Looking forward to more of these.


 
Comment by Ajith Edassery
2008-12-01 02:24:56

Syed, this is a good utility post :) In fact, recently I had modified the WordPress core to use ‘nofollow’ attributes selectively.

Another thing that is pissing me off right now is the page sequencing. Everytime, I add or hide page and if I want it to be in a particular sequence, I end up editing three or four pages to set the sequence id or priority. Any tip to work around this? I had read about a plugin to make this better but forgot where it was.


 
Comment by Web Design Beach
2008-12-01 04:25:34

Thank for the tutorial. Very useful indeed. I think WP should make separate part for admins for more advanced BlogRoll customization.


 
Comment by jackie sheeler
2008-12-01 07:16:35

i agree with web design beach — i’d like to see an admin function for this, as i really am not up to your level of coding, syed!


 
Comment by Automotive news
2008-12-02 11:53:39

Thanks for the tips. Being new to blogging, these were very useful and I am sure to incorporate them in my blog.


 
2008-12-05 17:05:34

Thanks for this tutorial! I never knew you could sort your blogroll links by the time they were last updated… this should come in handy for some of my blogs!


 
Comment by Nihar
2008-12-07 07:19:17

Thanks for the tutorial. I will try to organize the blogroll on my blog.


 
Comment by threio
2009-04-25 18:02:22

Extremely helpful tutorial, this is always a toothache managing blogroll links–thanks


Comment by Syed Balkhi
2009-04-25 20:15:35

I am glad it helped :) Yeah thats why I wrote this tutorial because I struggled with this before.


 
 

Sorry, the comment form is closed at this time.

Subscribe to Balkhis via RSS
Subscribe to Balkhis via Email Pimp My Blog