<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Cordobo &#187; Plugin</title>
	<atom:link href="http://cordobo.com/tag/plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://cordobo.com</link>
	<description>Weblog of Andreas Jacob on Webdesign and CSS</description>
	<lastBuildDate>Mon, 20 Feb 2012 09:57:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>WordPress: Limited Randomized Blogroll without Plugin</title>
		<link>http://cordobo.com/1476-random-wordpress-blogroll/</link>
		<comments>http://cordobo.com/1476-random-wordpress-blogroll/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 15:10:05 +0000</pubDate>
		<dc:creator>Andreas Jacob</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://cordobo.com/?p=1476</guid>
		<description><![CDATA[Create a smaller blogroll with many links with Wordpress built-in functions wp_list_bookmarks, limit, and orderby]]></description>
			<content:encoded><![CDATA[<p>Have you ever redesigned your blog and <strong>your new design only allowed a limited space for your &#8220;one mile high&#8221; blogroll?</strong> A friend of mine ran into exactly this problem with his newly redesigned blog.</p>
<p><span id="more-1476"></span></p>
<p>The really simple solution we came up is resource-friendly while <strong>he can keep all of his links</strong>. Most probably the best thing of this simple usage of WordPress functions: it&#8217;s entirely based on WordPress&#8217; <strong>template tags</strong> and there is no need for another plugin.</p>
<h3>WordPress Template Tags</h3>
<p>Our weapon of choice is the <a href="http://codex.wordpress.org/Template_Tags/wp_list_bookmarks">wp_list_bookmarks</a> template tag. It comes in handy if you use a new <a href="http://cordobo.com/free-wordpress-templates/">WordPress theme</a> as starting point, which already uses this tag. If not, now it&#8217;s the time to get rid of deprecated tags like <code>get_links()</code> or <code>get_links_list()</code>.</p>
<p>To start, open the file where your link-list is located, most probably sidebar.php or footer.php. The default usage for wp_list_bookmarks is:</p>
<p><code>&lt;?php wp_list_bookmarks(); ?&gt;</code></p>
<h3>Useful parameters: limit and orderby</h3>
<p>Remember, we need to limit the output because of the new design while still giving link-love to all of our blog-friends. To achieve this goal, we applied two parameters to the tag:</p>
<p><code>limit</code> and <code>orderby</code>.</p>
<h3>The Function</h3>
<p>These two parameters combined provide us with the limited set of randomized links we need. Seven randomized links fit into the available space, so here is the final template tag with two parameters applied:</p>
<p><code>&lt;?php wp_list_bookmarks('limit=7&#038;orderby=rand'); ?&gt;</code></p>
<p>Jupp, it&#8217;s remarkably simple, but it works exactly as intended.</p>
]]></content:encoded>
			<wfw:commentRss>http://cordobo.com/1476-random-wordpress-blogroll/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

