<?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>raphael haefeli &#124; portland, oregon freelance web design and development &#187; Wordpress</title>
	<atom:link href="http://www.raphaelhaefeli.com/archives/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.raphaelhaefeli.com</link>
	<description>Home of Raphael Haefeli</description>
	<lastBuildDate>Wed, 11 Aug 2010 22:56:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to Display the Most Popular Content in Your WordPress Sidebar</title>
		<link>http://www.raphaelhaefeli.com/wordpress/how-to-display-most-popular-content-wordpress-sidebar/</link>
		<comments>http://www.raphaelhaefeli.com/wordpress/how-to-display-most-popular-content-wordpress-sidebar/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 06:01:34 +0000</pubDate>
		<dc:creator>Raphael</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.raphaelhaefeli.com/?p=338</guid>
		<description><![CDATA[

What is best way to keep your visitors entertained and make them stay longer on your blog? One way is to list the most popular content in your sidebar. The following code will display the top five posts with the most comments in your site. All you need to do is to paste the code [...]]]></description>
			<content:encoded><![CDATA[<img src="http://www.raphaelhaefeli.com/wp-content/uploads/2010/01/wp-logo.png" alt="" title="WordPress" width="64" height="64" class="alignleft size-full wp-image-346" />

<p>What is best way to keep your visitors entertained and make them stay longer on your blog? One way is to list the most popular content in your sidebar. The following code will display the top five posts with the most comments in your site. All you need to do is to paste the code below into your sidebar.php file and you are good to go.</p>
<pre>
<code >&lt;h2&gt;Popular Posts:&lt;/h2&gt;
&lt;ul&gt;
&lt; ?php $result = $wpdb-&gt;get_results
("SELECT comment_count,ID,post_title FROM $wpdb-&gt;posts ORDER BY comment_count DESC
 LIMIT 0 , 5");
foreach ($result as $post) {
setup_postdata($post);
$postid = $post-&gt;ID;
$title = $post-&gt;post_title;
$commentcount = $post-&gt;comment_count;
if ($commentcount != 0) { ?&gt;
&lt;li&gt;&lt;a href="&lt;?php echo get_permalink($postid); ?&gt;" title="&lt; ?php echo $title ?&gt;"&gt;
&lt; ?php echo $title ?&gt;&lt;/a&gt; {&lt; ?php echo $commentcount ?&gt;}&lt;/li&gt;
&lt; ?php } } ?&gt;
&lt;/ul&gt;</code>
</pre>
<p>Credit: <a href="http://www.wprecipes.com/how-to-display-your-most-popular-content-in-your-blog-sidebar" target="_blank">WPRecipes</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.raphaelhaefeli.com/wordpress/how-to-display-most-popular-content-wordpress-sidebar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create a &#8220;Share on Facebook&#8221; Button for Your WordPress Blog</title>
		<link>http://www.raphaelhaefeli.com/wordpress/create-a-share-on-facebook-button-for-wordpress/</link>
		<comments>http://www.raphaelhaefeli.com/wordpress/create-a-share-on-facebook-button-for-wordpress/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 06:31:32 +0000</pubDate>
		<dc:creator>Raphael</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.raphaelhaefeli.com/?p=308</guid>
		<description><![CDATA[

A few weeks ago I posted the article Create a “Send to Twitter” button for your WordPress
blog, in which you can create a button that will share what you are reading with your followers. 

This week I will show you how you can add a “Share on Facebook” button in your WordPress blog to bring [...]]]></description>
			<content:encoded><![CDATA[<img src="http://www.raphaelhaefeli.com/wp-content/uploads/2010/01/facebook_64.png" alt="" title="Facebook" width="64" height="64" class="alignleft size-full wp-image-321" />

<p>A few weeks ago I posted the article Create a “<a href="http://www.raphaelhaefeli.com/wordpress/create-a-send-to-twitter-button-for-wordpress/">Send to Twitter</a>” button for your WordPress
blog, in which you can create a button that will share what you are reading with your followers. </p>

<p>This week I will show you how you can add a “Share on Facebook” button in your WordPress blog to bring in more visitors.
This is very simple, just like the Twitter button tutorial.</p>

<p>Open your single post file (single.php) file from your theme directory and insert the following code within the loop:</p>

<pre><code >&lt;a href="http://www.facebook.com/sharer.php?u=&lt;?php the_permalink();?&gt;
&amp;t=&lt; ?php the_title(); ?&gt;" target="_blank"&gt;Share on Facebook&lt;/a&gt;</code></pre>

<p>To make things more interesting, you can use <span class="simplecode">getTinyUrl()</span> function to send a short URL to Facebook:</p>

<pre><code >&lt; ?php $turl = getTinyUrl(get_permalink($post-&gt;ID)); ?&gt;
&lt;a href="http://www.facebook.com/sharer.php?u=&lt;?php echo $turl;?&gt;&amp;t=
&lt; ?php the_title(); ?&gt;" target="_blank"&gt;Share on Facebook&lt;/a&gt;</code></pre>

<p>That&#8217;s it! Now your readers will able to share your posts in their Facebook. This is a great way to boost your site&#8217;s traffic!</p>

<p>Source: <a href="http://www.wprecipes.com/how-to-add-a-share-on-facebook-link-to-your-wordpress-blog" target=" _blank">WPRecipes</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.raphaelhaefeli.com/wordpress/create-a-share-on-facebook-button-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Create a &#8220;Send to Twitter&#8221; button for your WordPress blog</title>
		<link>http://www.raphaelhaefeli.com/wordpress/create-a-send-to-twitter-button-for-wordpress/</link>
		<comments>http://www.raphaelhaefeli.com/wordpress/create-a-send-to-twitter-button-for-wordpress/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 17:20:13 +0000</pubDate>
		<dc:creator>Raphael</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.raphaelhaefeli.com/?p=182</guid>
		<description><![CDATA[

Do you use Twitter on a daily basis? If so, you know how good Twitter is for sharing with everyone what you find interesting around the web. Here&#8217;s a great way to give your readers a chance to share your Wordpress blog posts with their friends and bring more visitors to you.

This is a very [...]]]></description>
			<content:encoded><![CDATA[<img src="http://www.raphaelhaefeli.com/wp-content/uploads/2010/01/twitter_logo1-e1262971116544.png" alt="" title="Twitter" width="400" height="94" class="aligncenter size-full wp-image-193" />
<br />
<p>Do you use Twitter on a daily basis? If so, you know how good Twitter is for sharing with everyone what you find interesting around the web. Here&#8217;s a great way to give your readers a chance to share your Wordpress blog posts with their friends and bring more visitors to you.</p><p>

</p><p>This is a very simple Worpress hack where you will create a link to Twitter with a status parameter. We will use the function <span class="simplecode">the_permalink()</span> to get the page URL:</p>

<pre><code >&lt;a href="http://twitter.com/home?status=Currently reading &lt;?php the_permalink();?&gt;"
title="Click to send this page to Twitter!" target="_blank"&gt;Share on Twitter&lt;/a&gt;</code></pre>

<p>You can add this line of code to your single post file (single.php) in order to display it on each individual post and also add it to your main index template (index.php) to display under each post title in the blog&#8217;s index page. </p>

<p>Source: <a href="http://www.wprecipes.com/how-to-create-a-send-this-to-twitter-button" target="_blank">How to: Create a “Send this to Twitter” button</a>.

</p><p>Enjoy!</p>]]></content:encoded>
			<wfw:commentRss>http://www.raphaelhaefeli.com/wordpress/create-a-send-to-twitter-button-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
