<?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; Hacks</title>
	<atom:link href="http://cordobo.com/category/hacks/feed/" rel="self" type="application/rss+xml" />
	<link>http://cordobo.com</link>
	<description>Weblog of Andreas Jacob on Webdesign and CSS</description>
	<lastBuildDate>Wed, 05 Oct 2011 19:00:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Integrate Facebook’s &#8220;Like&#8221; Plugin into WordPress</title>
		<link>http://cordobo.com/1608-facebook-like-plugin-wordpress/</link>
		<comments>http://cordobo.com/1608-facebook-like-plugin-wordpress/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 20:24:41 +0000</pubDate>
		<dc:creator>Andreas Jacob</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[Like Button]]></category>
		<category><![CDATA[Like-Plugin]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://cordobo.com/?p=1608</guid>
		<description><![CDATA[Facebook recently announced the take-over of the internet with the introduction of the yet infamous &#8220;like&#8221;-button. Nevertheless, here is how you can add your own dynamic like-button for WordPress. If you use Facebook&#8217;s generator here, you&#8217;ll get some content very similar to mine: &#60;iframe src=&#34;http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fcordobo.com%2F&#38;amp;layout=standard&#38;amp;show-faces=true&#38;amp;width=450&#38;amp;action=like&#38;amp;colorscheme=light&#34; scrolling=&#34;no&#34; frameborder=&#34;0&#34; allowTransparency=&#34;true&#34; style=&#34;border:none; overflow:hidden; width:500px; height:60px&#34;&#62;&#60;/iframe&#62; Note: I highlighted [...]]]></description>
			<content:encoded><![CDATA[<p>Facebook recently announced the take-over of the internet with the introduction of the yet infamous <a href="http://developers.facebook.com/docs/reference/plugins/like">&#8220;like&#8221;-button</a>. Nevertheless, here is how you can add your own dynamic like-button for WordPress.</p>
<p>If you use Facebook&#8217;s generator <a href="http://developers.facebook.com/docs/reference/plugins/like">here</a>, you&#8217;ll get some content very similar to mine:</p>
<p><span id="more-1608"></span></p>
<p><code>&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=<strong>http%3A%2F%2Fcordobo.com%2F</strong>&amp;amp;layout=standard&amp;amp;show-faces=true&amp;amp;width=450&amp;amp;action=like&amp;amp;colorscheme=light&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; allowTransparency=&quot;true&quot; style=&quot;border:none; overflow:hidden; width:500px; height:60px&quot;&gt;&lt;/iframe&gt;</code></p>
<p><small>Note: I highlighted the parts I replace in the next step</small></p>
<p>This would be fine, if you had only one page on your website, as the plugin only shows the url you have entered in the generator &ndash; no dynamic pages. So here&#8217;s how you can add some dynamic flavour to your new button:</p>
<p>Replace the following code</p>
<p><code>[&hellip;]like.php?href=<strong>http%3A%2F%2Fcordobo.com%2F</strong></code></p>
<p>with</p>
<p><code>[&hellip;]like.php?href=<strong>&lt;?php echo urlencode(get_permalink($post-&gt;ID)); ?&gt;</strong></code></p>
<p>insert it into your theme&#8217;s <strong>single.php</strong> and upload it to your server.</p>
<h3 id="facebook-like-button">The final code, ready for copy &#038; paste</h3>
<p>This is the final code you can use in your own WordPress installation without further modifications (except the width and height). Insert it into your <strong>single.php</strong> and upload the modified file to your server.</p>
<p><code>&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=<strong>&lt;?php echo urlencode(get_permalink($post-&gt;ID)); ?&gt;</strong>&amp;amp;layout=standard&amp;amp;show-faces=true&amp;amp;width=500&amp;amp;action=like&amp;amp;colorscheme=light&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; allowTransparency=&quot;true&quot; style=&quot;border:none; overflow:hidden; width:500px; height:60px&quot;&gt;&lt;/iframe&gt;</code></p>
<p><small>Note: I highlighted the parts I replaced</small></p>
<p>In case you use some caching plugin, clear the cache and see the magic as it happens.</p>
<p>If you like it, click on &#8220;like&#8221; ;-)</p>
]]></content:encoded>
			<wfw:commentRss>http://cordobo.com/1608-facebook-like-plugin-wordpress/feed/</wfw:commentRss>
		<slash:comments>72</slash:comments>
		</item>
		<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>

