How to: Show random links in WordPress
Written by Malin on August 10, 2007 – 10:35 am -Quite a few people have asked me how I display my random exits in the sidebar on infektia.net. So I thought I could be be nice and explain it here.
Since I have many so called link exchanges, I decided to not show them all in my sidebar. The list would be really long. So I created an “Exit” page where all the links (from WordPress’ own blogroll that you manage in the wp admin) will be shown instead.
The coding for showing all blogroll links:
<ul>
<?php get_links(2, '<li>', '</li>', '', TRUE, 'name', FALSE); ?>
</ul>
The coding for showing random blogroll links:
This code will show five random links.
<ul>
<?php get_links(-1,'<li>', '</li>', '', false, 'rand', false, false, 5); ?>
</ul>
Learn more
If you want to customize the output more I suggest you read the Template Tags/Get Links in the WordPress codex, every bit of coding is more explained there.
Thoughts Aside
To get into the DeVry University, it is important that your 70-350 and 642-445 scores got accepted. A 220-301 as well as a 646-562 would suffice too and make sure you are not recreating the disaster 642-372.
Posted in How to |
- How to add NoFollow to the WordPress Blogroll
- Free Webmaster Tools
- 10 Great links - Batch 1
- WordPress Bits
- RaterGators
By glowstars on Aug 24, 2007 | Reply
wow thanks for this one! it works fine!
By Rudi on Aug 27, 2007 | Reply
“Since I have many so called link exchanges, I decided to not show them all in my sidebar. The list would be really long. So I created an “Exit†page … ”
So I created my WebKompass:
http://eisbrecher.net/indexu/