<?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>Walker News &#187; Wordpress</title>
	<atom:link href="http://www.walkernews.net/tag/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.walkernews.net</link>
	<description>A capsule of walker's experience in life...</description>
	<lastBuildDate>Sun, 29 Jan 2012 16:29:08 +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>How To Finetune And Add Google +1 Button To HTML Or WordPress?</title>
		<link>http://www.walkernews.net/2011/07/04/how-to-finetune-and-add-google-1-button-to-html-or-wordpress/</link>
		<comments>http://www.walkernews.net/2011/07/04/how-to-finetune-and-add-google-1-button-to-html-or-wordpress/#comments</comments>
		<pubDate>Sun, 03 Jul 2011 16:10:55 +0000</pubDate>
		<dc:creator>Walker</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.walkernews.net/?p=8204</guid>
		<description><![CDATA[Trick used to finetune placement of Google +1 button in HTML for better page load performance.]]></description>
			<content:encoded><![CDATA[There is this <a href="http://www.google.com/webmasters/+1/button/" title="Official wizard used to generate Google +1 button code for adding to website." target="_blank">official wizard</a> helps one to easily create Google +1 button for embedding in HTML or WordPress powered site, but you might want to tweak the Google +1 button for better <span class="subhead2">page load performance</span>.<br />
<span id="more-8204"></span><br />
Firstly, the default Google +1 button code generated by wizard requires web browser to load JavaScript from HTTPS source. As you may know, loading HTTPS content requires stable Internet connection. If there are too many packet loss (e.g. ping result shows &#8220;Lost&#8221; of more than 5%), the page content from HTTPS source will likely wait forever to complete or the worst situation is nothing rendered at all!<br />
<blockquote>
If you ever experience Gmail shows loading problem and then it prompts you to select &#8220;Load basic HTML for slow connection&#8221;, you may understand the pain of accessing HTTPS content over a troubled connection.
</blockquote>
<br />If your page is not sourced over HTTPS (most blogs and websites are not), then you <span class="subhead2">should finetune</span> Google +1 button code to load plusone.js from &#8220;http&#8221; instead of &#8220;https&#8221;, i.e.:<br />
<pre>
&lt;script type="text/javascript" src="<span class="rtxt">http</span>://apis.google.com/js/plusone.js"&gt;&lt;/script&gt;
</pre>
<br />Note, if your page is loaded over HTTPS, then you should use the default +1 button code, otherwise some web browsers (e.g. Internet Explorer) might display <a href="http://www.walkernews.net/2009/10/19/why-ie8-displays-security-warning-when-loading-https-page/" title="Fix IE8 security warning when it load page with mixed content." rel="bookmark">security warning when loading mixed content</a>.<br />
<br />Secondly, try not putting plusone.js script at header section of HTML or at beginning of article, for the sake of page load performance. Say there is issue to load plusone.js, it might impact overall page load if that JavaScript is loaded first (since it&#8217;s in the header section) before the rest, most importantly the main content.<br />
<br />So, the <span class="subhead2">best place</span> to embed Google +1 button, if possible, is at footer section (e.g. footer.php of WordPress powered sites) or at section where it&#8217;s loaded after main/important content, for reading pleasure.<br />
<br />Thirdly, <span class="subhead2">use href</span> to explicitly specify page URL to +1. The first attempt of plusone.js is to detect the href value of &#8220;g:plusone&#8221; and the fact of parsing <code>link rel="canonical"</code> tag is likely incur overhead (additional step to check for alternate source of page URL) and the parsed value is subject to accuracy of canonical value (added by WordPress, for example).<br />
<br />Lastly, use <span class="subhead2">explicit load</span> for performance reason too (with reference to <a href="http://code.google.com/apis/+1button/" target="_blank">+1 button API documentation</a>), e.g.:<br />
<pre>
&lt;script type="text/javascript" src="http://apis.google.com/js/plusone.js"&gt;<span class="rtxt">{"parsetags":"explicit"}</span>&lt;/script&gt;
</pre>
<br />Note, this &#8220;explicit load&#8221; value of parsetags requires you to call either gapi.plusone.go(container) or gapi.plusone.render(container) method to render +1 button.<br />
<br />So, here is this complete <span class="subhead2">example of Google +1 button code</span> created with performance in mind (replace the <em>page_url</em> accordingly, e.g. uses <code>get_permalink($post->ID)</code> of WordPress to get current page URL):<br />
<pre>
&lt;div id="gpon"&gt;

   &lt;script type="text/javascript" src="http://apis.google.com/js/plusone.js"&gt;{"parsetags":"explicit"}&lt;/script&gt;

   &lt;g:plusone count="false" href="<span class="btxt">page_url</span>"&gt;&lt;/g:plusone&gt;

   &lt;script type="text/javascript"&gt;gapi.plusone.go("gpon");&lt;/script&gt;

&lt;/div&gt;
</pre>
<br />You may use the official wizard to customize +1 button, such as size and whether to display count or not (my example explicitly disable +1 count):<br />
<br /><img src="http://www.walkernews.net/wp-content/uploads/2011/07/Google-plus-one-button.gif" alt="Customize Google +1 button for websites." title="Customize Google +1 button for websites." width="500" height="240" /><br />
<br />Then, replace <code>&lt;g:plusone count="false"&gt;&lt;/g:plusone&gt;</code> with the line generated by wizard according to your customization (but remember to include the &#8220;href&#8221; value of g:plusone).<br />
<ul class="related_post"><li><a href="http://www.walkernews.net/2011/01/16/how-to-find-a-wordpress-blog-rss-or-atom-feed-url/" title="How To Find A WordPress Blog RSS Or ATOM Feed URL?">How To Find A WordPress Blog RSS Or ATOM Feed URL?</a></li><li><a href="http://www.walkernews.net/2010/11/23/2-ways-to-add-facebook-like-button-with-comment-box-to-wordpress/" title="2 Ways To Add Facebook Like Button With Comment Box To WordPress">2 Ways To Add Facebook Like Button With Comment Box To WordPress</a></li><li><a href="http://www.walkernews.net/2010/11/09/how-to-add-facebook-share-button-to-wordpress-post-page/" title="How To Add Facebook Share Button To WordPress Post Page?">How To Add Facebook Share Button To WordPress Post Page?</a></li><li><a href="http://www.walkernews.net/2010/11/07/how-to-add-facebook-like-button-on-wordpress-post-page/" title="How To Add Facebook Like Button On WordPress Post Page?">How To Add Facebook Like Button On WordPress Post Page?</a></li><li><a href="http://www.walkernews.net/2010/02/27/how-to-add-qr-code-of-each-post-page-in-wordpress/" title="How To Add QR Code Of Each Post Page In WordPress?">How To Add QR Code Of Each Post Page In WordPress?</a></li><li><a href="http://www.walkernews.net/2010/01/09/display-wordpress-categories-in-one-comma-separated-line/" title="Display WordPress Categories In One Comma-separated Line">Display WordPress Categories In One Comma-separated Line</a></li><li><a href="http://www.walkernews.net/2009/07/18/how-to-embed-swf-in-html-code-or-wordpress-post/" title="How To Embed SWF In HTML Code Or WordPress Post?">How To Embed SWF In HTML Code Or WordPress Post?</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.walkernews.net/2011/07/04/how-to-finetune-and-add-google-1-button-to-html-or-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Find A WordPress Blog RSS Or ATOM Feed URL?</title>
		<link>http://www.walkernews.net/2011/01/16/how-to-find-a-wordpress-blog-rss-or-atom-feed-url/</link>
		<comments>http://www.walkernews.net/2011/01/16/how-to-find-a-wordpress-blog-rss-or-atom-feed-url/#comments</comments>
		<pubDate>Sun, 16 Jan 2011 13:33:01 +0000</pubDate>
		<dc:creator>Walker</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.walkernews.net/?p=6436</guid>
		<description><![CDATA[What is RSS or ATOM feed URL of your self-hosting WordPress-powered blog?]]></description>
			<content:encoded><![CDATA[For those who run WordPress-powered blog (self-hosting setup), do you already know how to find the RSS or ATOM feed URL, if there is hyperlink text printed on any pages?<br />
<span id="more-6436"></span><br />
When setting up Feedburner service, for example, it will ask for the feed URL. So, where is it? Where to find the feed URL? How does it look like?<br />
<br />With reference to <a href="http://codex.wordpress.org/WordPress_Feeds" target="_blank">WordPress Codex</a> (official documentation), the supported feed URL of a WordPress-powered blog are as such (replace &#8220;example.com&#8221; to your blog home page URL):<br />
<dl>
<dt>RSS 2.0 (default):</dt>
<dd>
<br />http://example.com/?feed=rss2<br />
<br />http://example.com/feed/rss2/<br />
<br />http://example.com/feed/<br />
</dd>
</dl>
<dl>
<dt>RDF/RSS 1.0:</dt>
<dd>
<br />http://example.com/?feed=rdf<br />
<br />http://example.com/feed/rdf/<br />
</dd>
</dl>
<dl>
<dt>RSS 0.92:</dt>
<dd>
<br />http://example.com/?feed=rss<br />
<br />http://example.com/feed/rss/<br />
</dd>
</dl>
<dl>
<dt>ATOM feed:</dt>
<dd>
<br />http://example.com/?feed=atom<br />
<br />http://example.com/feed/atom/<br />
</dd>
</dl>
<br />As you can see, the easiest to remember feed URL is probably the 3rd sample of RSS 2.0 feed.<br />
<ul class="related_post"><li><a href="http://www.walkernews.net/2011/07/04/how-to-finetune-and-add-google-1-button-to-html-or-wordpress/" title="How To Finetune And Add Google +1 Button To HTML Or WordPress?">How To Finetune And Add Google +1 Button To HTML Or WordPress?</a></li><li><a href="http://www.walkernews.net/2010/11/23/2-ways-to-add-facebook-like-button-with-comment-box-to-wordpress/" title="2 Ways To Add Facebook Like Button With Comment Box To WordPress">2 Ways To Add Facebook Like Button With Comment Box To WordPress</a></li><li><a href="http://www.walkernews.net/2010/11/09/how-to-add-facebook-share-button-to-wordpress-post-page/" title="How To Add Facebook Share Button To WordPress Post Page?">How To Add Facebook Share Button To WordPress Post Page?</a></li><li><a href="http://www.walkernews.net/2010/11/07/how-to-add-facebook-like-button-on-wordpress-post-page/" title="How To Add Facebook Like Button On WordPress Post Page?">How To Add Facebook Like Button On WordPress Post Page?</a></li><li><a href="http://www.walkernews.net/2010/02/27/how-to-add-qr-code-of-each-post-page-in-wordpress/" title="How To Add QR Code Of Each Post Page In WordPress?">How To Add QR Code Of Each Post Page In WordPress?</a></li><li><a href="http://www.walkernews.net/2010/01/09/display-wordpress-categories-in-one-comma-separated-line/" title="Display WordPress Categories In One Comma-separated Line">Display WordPress Categories In One Comma-separated Line</a></li><li><a href="http://www.walkernews.net/2009/07/18/how-to-embed-swf-in-html-code-or-wordpress-post/" title="How To Embed SWF In HTML Code Or WordPress Post?">How To Embed SWF In HTML Code Or WordPress Post?</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.walkernews.net/2011/01/16/how-to-find-a-wordpress-blog-rss-or-atom-feed-url/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2 Ways To Add Facebook Like Button With Comment Box To WordPress</title>
		<link>http://www.walkernews.net/2010/11/23/2-ways-to-add-facebook-like-button-with-comment-box-to-wordpress/</link>
		<comments>http://www.walkernews.net/2010/11/23/2-ways-to-add-facebook-like-button-with-comment-box-to-wordpress/#comments</comments>
		<pubDate>Tue, 23 Nov 2010 06:53:10 +0000</pubDate>
		<dc:creator>Walker</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.walkernews.net/?p=5917</guid>
		<description><![CDATA[Sample PHP code used to add Facebook Like Button with comment box on WordPress posts.]]></description>
			<content:encoded><![CDATA[The new Facebook Like Button with comment box allows visitors to easily share their thought for a page or link on Facebook profile.<br />
<span id="more-5917"></span><br />
If you would like to add this new Facebook Like Button to WordPress blog, here are two different ways to get it done in minutes, even WITHOUT installing a WordPress plugin.<br />
<blockquote>
With reference to <a href="http://developers.facebook.com/docs/reference/plugins/like" target="_blank">Facebook Social Plugin guide</a>, comment box only available for the iframe version of FB Like Button that uses &#8220;standard&#8221; layout style with a width of at least 400 pixels. As for the XFBML version, there is always an option to add a comment.<br />
<br />In addition, the page URL must be encoded to RFC 1738 format.
</blockquote>
<br /><span class="subhead2">Uses functions.php</span><br />
<br />Edit functions.php of active WordPress theme to add this block of PHP code (to automatically append the FB Like Button to post content):<br />
<pre>
add_filter('the_content','wfblike');

function wfblike($incontent){

  $FbLike = '&lt;iframe src="http://www.facebook.com/plugins/like.php?href=</span>' . <span style="color:#00F;font-weight:bold;">rawurlencode(get_permalink())</span> . '&amp;layout=standard&amp;show_faces=true&amp;width=480&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none;overflow:hidden;width:480px;height:80px;" allowTransparency="true"&gt;&lt;/iframe&gt;';

  if ($post->post_parent || is_single())
    $incontent = $incontent . $FbLike;
  return $incontent;
}
</pre>
<br />The rawurlencode is standard PHP function used to encode or convert hyperlink to the required RFC 1738 format.<br />
<br />If there is no such functions.php file in active WordPress theme folder, just create one with these two lines:<br />
<pre>
&lt;?php
?&gt;
</pre>
<br />Then, insert the block of code in between the <code>&lt;?php</code> and <code>?&gt;</code>
</pre>
<br /><span class="subhead2">Using comments.php</span><br />
<br />If visitors will leave a comment for the post, they might prefer to share their thought about the page on Facebook :-)<br />
<br />Of course, you can use other PHP files in the active theme folder (except for header.php, 404.php...).<br />
<br />Insert this block of code to comments.php file (embed PHP in HTML code, which is different than the one used in functions.php):<br />
<pre>
&lt;iframe src="http://www.facebook.com/plugins/like.php?href=<span style="color:#00F;font-weight:bold;">&lt;?php echo rawurlencode(get_permalink()); ?&gt;</span>&amp;layout=standard&amp;show_faces=true&amp;width=480&amp;action=recommend&amp;colorscheme=dark&amp;height=80" scrolling="no" frameborder="0" style="border:none;overflow:hidden;width:480px;height:80px;" allowTransparency="true"&gt;&lt;/iframe&gt;
</pre>
<br />Whichever way you'll use, you might also need to use some CSS syntax to control the iframe appearance on your theme.<br />
<br />If this is trick is too hard for you, then get a WordPress plugin or buy me a coffee to do it for you :-)<br />
<ul class="related_post"><li><a href="http://www.walkernews.net/2011/07/04/how-to-finetune-and-add-google-1-button-to-html-or-wordpress/" title="How To Finetune And Add Google +1 Button To HTML Or WordPress?">How To Finetune And Add Google +1 Button To HTML Or WordPress?</a></li><li><a href="http://www.walkernews.net/2011/01/16/how-to-find-a-wordpress-blog-rss-or-atom-feed-url/" title="How To Find A WordPress Blog RSS Or ATOM Feed URL?">How To Find A WordPress Blog RSS Or ATOM Feed URL?</a></li><li><a href="http://www.walkernews.net/2010/11/09/how-to-add-facebook-share-button-to-wordpress-post-page/" title="How To Add Facebook Share Button To WordPress Post Page?">How To Add Facebook Share Button To WordPress Post Page?</a></li><li><a href="http://www.walkernews.net/2010/11/07/how-to-add-facebook-like-button-on-wordpress-post-page/" title="How To Add Facebook Like Button On WordPress Post Page?">How To Add Facebook Like Button On WordPress Post Page?</a></li><li><a href="http://www.walkernews.net/2010/02/27/how-to-add-qr-code-of-each-post-page-in-wordpress/" title="How To Add QR Code Of Each Post Page In WordPress?">How To Add QR Code Of Each Post Page In WordPress?</a></li><li><a href="http://www.walkernews.net/2010/01/09/display-wordpress-categories-in-one-comma-separated-line/" title="Display WordPress Categories In One Comma-separated Line">Display WordPress Categories In One Comma-separated Line</a></li><li><a href="http://www.walkernews.net/2009/07/18/how-to-embed-swf-in-html-code-or-wordpress-post/" title="How To Embed SWF In HTML Code Or WordPress Post?">How To Embed SWF In HTML Code Or WordPress Post?</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.walkernews.net/2010/11/23/2-ways-to-add-facebook-like-button-with-comment-box-to-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Add Facebook Share Button To WordPress Post Page?</title>
		<link>http://www.walkernews.net/2010/11/09/how-to-add-facebook-share-button-to-wordpress-post-page/</link>
		<comments>http://www.walkernews.net/2010/11/09/how-to-add-facebook-share-button-to-wordpress-post-page/#comments</comments>
		<pubDate>Tue, 09 Nov 2010 06:51:08 +0000</pubDate>
		<dc:creator>Walker</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.walkernews.net/?p=5842</guid>
		<description><![CDATA[The steps of adding FB Share Button on WordPress post page.]]></description>
			<content:encoded><![CDATA[It is darn easy to add Facebook Share button on WordPress or HTML page that allows visitors to share the link / URL on Facebook.<br />
<span id="more-5842"></span><br />
With reference to <a href="http://developers.facebook.com/docs/share" target="_blank">Facebook documentation</a>, however, the social networking giant suggests users to use <a href="http://www.walkernews.net/2010/11/07/how-to-add-facebook-like-button-on-wordpress-post-page/" title="Simple plugin used to add Facebook Like Button on WordPress" rel="bookmark">FB Like Button</a> for sharing pages, hints the FB Share Button will be deprecated.<br />
<br />If you still want to consider it, here is this 2-step guide:<br />
<br />1) Open header.php file of active WordPress theme and add this script tag to the line between <code>&lt;head&gt;&lt;/head&gt;</code> tag.<br />
<pre>
&lt;script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"&gt;
&lt;/script&gt;
</pre>
<blockquote>
Putting this script tag at header will get the JavaScript file loads faster so the functions in it are available for calling asap.
</blockquote>
<br />2) Open single.php file of active WordPress theme (or the PHP file template in theme folder that generate page of which you want to add the said social networking feature) and insert the FB Share Button hyperlink tag:<br />
<pre>
&lt;a name="fb_share"&gt;&lt;/a&gt;
</pre>
<blockquote>
This simple link tag will be converted by JavaScript function (added by step-1) to the FB Share Button for current page URL accordingly.
</blockquote>
<br />Note, there are three different styles of FB Share Button available, which can be specified by <code>type</code> attribute (default style is &#8220;button&#8221; if not specified), i.e.:<br />
<pre>
&lt;a name="fb_share" <span style="color:#F00;font-weight:bold;">type</span>="button"&gt;

&lt;a name="fb_share" <span style="color:#F00;font-weight:bold;">type</span>="icon_link"&gt;

&lt;a name="fb_share" <span style="color:#F00;font-weight:bold;">type</span>="icon"&gt;
</pre>
<br />For those who are interested to create own button style, please use this hyperlink link template for the <code>&lt;a&gt;&lt;/a&gt;</code> tag:<br />
<pre>
http://www.facebook.com/sharer.php?u=&lt;Encoded URL&gt;&#038;t=&lt;Encoded title of content&gt;
</pre>
<br />For WordPress, the encoded URL can be easily generated by rawurlencode (PHP function), i.e.:<br />
<pre>
http://www.facebook.com/sharer.php?u=<span style="color:#F00;font-weight:bold;">&lt;?php echo rawurlencode(get_permalink()); ?&gt;</span>&#038;t=<span style="color:#F00;font-weight:bold;">&lt;?php echo rawurlencode(get_the_title()); ?&gt;</span>
</pre>
<br />That is all you need to do for adding the FB Share Button on WordPress. If you want FB automatically include excerpt or portion of content, specific thumbnail of image used in the post, etc, then you might need to include some meta tags required by Facebook in the header section of HTML page :-(.<br />
<ul class="related_post"><li><a href="http://www.walkernews.net/2011/07/04/how-to-finetune-and-add-google-1-button-to-html-or-wordpress/" title="How To Finetune And Add Google +1 Button To HTML Or WordPress?">How To Finetune And Add Google +1 Button To HTML Or WordPress?</a></li><li><a href="http://www.walkernews.net/2011/01/16/how-to-find-a-wordpress-blog-rss-or-atom-feed-url/" title="How To Find A WordPress Blog RSS Or ATOM Feed URL?">How To Find A WordPress Blog RSS Or ATOM Feed URL?</a></li><li><a href="http://www.walkernews.net/2010/11/23/2-ways-to-add-facebook-like-button-with-comment-box-to-wordpress/" title="2 Ways To Add Facebook Like Button With Comment Box To WordPress">2 Ways To Add Facebook Like Button With Comment Box To WordPress</a></li><li><a href="http://www.walkernews.net/2010/11/07/how-to-add-facebook-like-button-on-wordpress-post-page/" title="How To Add Facebook Like Button On WordPress Post Page?">How To Add Facebook Like Button On WordPress Post Page?</a></li><li><a href="http://www.walkernews.net/2010/02/27/how-to-add-qr-code-of-each-post-page-in-wordpress/" title="How To Add QR Code Of Each Post Page In WordPress?">How To Add QR Code Of Each Post Page In WordPress?</a></li><li><a href="http://www.walkernews.net/2010/01/09/display-wordpress-categories-in-one-comma-separated-line/" title="Display WordPress Categories In One Comma-separated Line">Display WordPress Categories In One Comma-separated Line</a></li><li><a href="http://www.walkernews.net/2009/07/18/how-to-embed-swf-in-html-code-or-wordpress-post/" title="How To Embed SWF In HTML Code Or WordPress Post?">How To Embed SWF In HTML Code Or WordPress Post?</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.walkernews.net/2010/11/09/how-to-add-facebook-share-button-to-wordpress-post-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Add Facebook Like Button On WordPress Post Page?</title>
		<link>http://www.walkernews.net/2010/11/07/how-to-add-facebook-like-button-on-wordpress-post-page/</link>
		<comments>http://www.walkernews.net/2010/11/07/how-to-add-facebook-like-button-on-wordpress-post-page/#comments</comments>
		<pubDate>Sat, 06 Nov 2010 16:42:56 +0000</pubDate>
		<dc:creator>Walker</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.walkernews.net/?p=5797</guid>
		<description><![CDATA[Using Facebook Like Button plugin and PHP code to create a FB Like Button on each of WordPress post page.]]></description>
			<content:encoded><![CDATA[<img style="float:left;margin:0px 9px 0px 0px;" src="http://www.walkernews.net/wp-content/uploads/2010/11/Facebook-Like-Button.gif" alt="The trick of to add FB Like Button on WordPress post dynamically." title="The trick of adding FB Like Button on WordPress." width="295" height="30" />It&#8217;s easy as falling off a log if you need to add a fancy Facebook Like Button to WordPress post pages without using yet another plugin that might slower down your blog hosted on a shared server.<br />
<span id="more-5797"></span><br />
<blockquote>
Personally, am not favor installing too many WordPress plugins, especially those providing simple tweak that can be achieved easily by adding simple PHP codes to functions.php file in an active theme folder.
</blockquote>
<br />So, if you&#8217;re adventurous and interested to dirty hands with some simple PHP coding, please allow me to show you how to get job done for this subject:<br />
<br />1) Log in to WordPress hosting account and open functions.php file in active theme directory for editing. If this file doesn&#8217;t exist on your active theme folder, then create the template file initialized with these two lines:<br />
<pre>
&lt;?php
?&gt;
</pre>
<br />2) Insert this block of PHP code after the <code>&lt;?php</code> line:<br />
<pre>
add_filter('the_content','wfblike');

function wfblike($incontent){

  $FbLike = '&lt;div style="margin-top:5px;width:500px;height:25px;background-color:#CACACA;"&gt;<span style="color:#F00;font-weight:bold;">&lt;iframe src="http://www.facebook.com/plugins/like.php?href=</span>' . <span style="color:#00F;font-weight:bold;">rawurlencode(get_permalink())</span> . '<span style="color:#F00;font-weight:bold;">&amp;layout=standard&amp;show_faces=false&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=25" scrolling="no" frameborder="0" style="border:none;overflow:hidden;width:450px;height:25px;" allowTransparency="true"&gt;&lt;/iframe&gt;</span>&lt;/div&gt;';

  if ($post->post_parent || is_single())
    $incontent = $incontent . $FbLike;
  return $incontent;
}
</pre>
<ul>
<li>The red color block of code is getting from the official <a href="http://developers.facebook.com/docs/reference/plugins/like" target="_blank">Facebook social plugin page</a>. Please refer there for the updated code, if there is one.<br />
&nbsp;</li>
<li>The blue color code is a standard PHP function called to convert or encode the current page URL to RFC 1738 format that is required by Facebook social plugin.</li>
</ul>
<br />That block of code (above) will append the Facebook Like Button to each of the post content as well as the <a href="http://www.walkernews.net/2009/04/13/turn-on-wordpress-feature-to-display-photo-exif-data-and-iptc-information/" title="Create a image.php file to display photo from Image Gallery in a zoom-in view together with EXIF and IPTC information." rel="bookmark">zoom-in image rendered by image.php</a> (redirected from Image Gallery).<br />
<br /><span style="text-decoration:line-through;">Now, where is the Facebook Like Button for this page? Well, at this time of writing, I don&#8217;t use it here, except the Share This Link on Facebook (bottom of page) and WalkerNews.net Fan page (right pane).</span><br />
<br /><span style="color:#F00;font-weight:bold;font-weight:bold;">UPDATE:</span><br />
Just added the FB Like Button to bottom of page as matter of personal preference (not because of this trick doesn&#8217;t work for this WordPress theme of WalkerNews.net &#8211; I assure you the trick does work!).<br />
<br />Additional notes:<br />
<br />1) Please change the CSS properties of DIV tag used in the block of code (above) to suit your theme, or just drop the DIV tag entirely if you want to.<br />
<br />2) Please refer to FB social plugin page (link at above) to update the red color block of code. FYI, the Iframe version of FB Like Button using &#8220;standard&#8221; layout with a width of at least 400 pixels allows visitor to add comments after click the Like button.<br />
<ul class="related_post"><li><a href="http://www.walkernews.net/2011/07/04/how-to-finetune-and-add-google-1-button-to-html-or-wordpress/" title="How To Finetune And Add Google +1 Button To HTML Or WordPress?">How To Finetune And Add Google +1 Button To HTML Or WordPress?</a></li><li><a href="http://www.walkernews.net/2011/01/16/how-to-find-a-wordpress-blog-rss-or-atom-feed-url/" title="How To Find A WordPress Blog RSS Or ATOM Feed URL?">How To Find A WordPress Blog RSS Or ATOM Feed URL?</a></li><li><a href="http://www.walkernews.net/2010/11/23/2-ways-to-add-facebook-like-button-with-comment-box-to-wordpress/" title="2 Ways To Add Facebook Like Button With Comment Box To WordPress">2 Ways To Add Facebook Like Button With Comment Box To WordPress</a></li><li><a href="http://www.walkernews.net/2010/11/09/how-to-add-facebook-share-button-to-wordpress-post-page/" title="How To Add Facebook Share Button To WordPress Post Page?">How To Add Facebook Share Button To WordPress Post Page?</a></li><li><a href="http://www.walkernews.net/2010/02/27/how-to-add-qr-code-of-each-post-page-in-wordpress/" title="How To Add QR Code Of Each Post Page In WordPress?">How To Add QR Code Of Each Post Page In WordPress?</a></li><li><a href="http://www.walkernews.net/2010/01/09/display-wordpress-categories-in-one-comma-separated-line/" title="Display WordPress Categories In One Comma-separated Line">Display WordPress Categories In One Comma-separated Line</a></li><li><a href="http://www.walkernews.net/2009/07/18/how-to-embed-swf-in-html-code-or-wordpress-post/" title="How To Embed SWF In HTML Code Or WordPress Post?">How To Embed SWF In HTML Code Or WordPress Post?</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.walkernews.net/2010/11/07/how-to-add-facebook-like-button-on-wordpress-post-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox Hotkey Causes Right-To-Left Display In WordPress Post Editor</title>
		<link>http://www.walkernews.net/2010/06/06/firefox-hotkey-causes-right-to-left-display-in-wordpress-post-editor/</link>
		<comments>http://www.walkernews.net/2010/06/06/firefox-hotkey-causes-right-to-left-display-in-wordpress-post-editor/#comments</comments>
		<pubDate>Sun, 06 Jun 2010 06:36:13 +0000</pubDate>
		<dc:creator>Walker</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.walkernews.net/?p=4743</guid>
		<description><![CDATA[What is the keyboard shortcut used to change Right-To-Left display in WordPress post editor?]]></description>
			<content:encoded><![CDATA[When using Firefox, the text display direction in a web form (.e.g WordPress post editor) suddenly changes from Left-To-Right (LTR) to Right-To-Left (RTL).<br />
<span id="more-4743"></span><br />
I don&#8217;t know how many (WordPress users) experienced this before, but I have certainly triggered the right alignment for a number of times.<br />
<br /><span class="subhead2">How to change between LTR and RTL text alignment in Firefox?</span><br />
<br /><img src="http://www.walkernews.net/wp-content/uploads/2010/06/Firefox-RTL-Hotkey.gif" alt="Firefox hotkey changes the WordPress post editor text align from LTR to RTL mode." title="Firefox hotkey changes the WordPress post editor text align from LTR to RTL mode." width="491" height="211" /><br />
<br />Note, this Firefox hotkey (thus NOT working on IE8 and maybe other web browsers too) is only tested on Firefox 3.6.3:<br />
<br />press CTRL+SHIFT+X together to switch between left and right text alignment, as shown in the <a href="http://www.walkernews.net/2010/05/28/youtube-how-to-create-animated-gif-from-images-using-photoshop/" title="YouTube video: How To Create Animated GIF From Images Using Photoshop?" rel="bookmark">animated GIF</a>.<br />
<ul class="related_post"><li><a href="http://www.walkernews.net/2011/07/04/how-to-finetune-and-add-google-1-button-to-html-or-wordpress/" title="How To Finetune And Add Google +1 Button To HTML Or WordPress?">How To Finetune And Add Google +1 Button To HTML Or WordPress?</a></li><li><a href="http://www.walkernews.net/2011/03/14/how-to-change-firefox-backspace-button-response/" title="How To Change Firefox Backspace Button Response?">How To Change Firefox Backspace Button Response?</a></li><li><a href="http://www.walkernews.net/2011/01/16/how-to-find-a-wordpress-blog-rss-or-atom-feed-url/" title="How To Find A WordPress Blog RSS Or ATOM Feed URL?">How To Find A WordPress Blog RSS Or ATOM Feed URL?</a></li><li><a href="http://www.walkernews.net/2010/11/23/2-ways-to-add-facebook-like-button-with-comment-box-to-wordpress/" title="2 Ways To Add Facebook Like Button With Comment Box To WordPress">2 Ways To Add Facebook Like Button With Comment Box To WordPress</a></li><li><a href="http://www.walkernews.net/2010/11/09/how-to-add-facebook-share-button-to-wordpress-post-page/" title="How To Add Facebook Share Button To WordPress Post Page?">How To Add Facebook Share Button To WordPress Post Page?</a></li><li><a href="http://www.walkernews.net/2010/11/07/how-to-add-facebook-like-button-on-wordpress-post-page/" title="How To Add Facebook Like Button On WordPress Post Page?">How To Add Facebook Like Button On WordPress Post Page?</a></li><li><a href="http://www.walkernews.net/2010/02/27/simple-wordpress-qr-code-plugin-to-create-2d-barcode-of-each-post-page/" title="Simple WordPress QR Code Plugin To Create 2D Barcode Of Each Post Page">Simple WordPress QR Code Plugin To Create 2D Barcode Of Each Post Page</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.walkernews.net/2010/06/06/firefox-hotkey-causes-right-to-left-display-in-wordpress-post-editor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple WordPress QR Code Plugin To Create 2D Barcode Of Each Post Page</title>
		<link>http://www.walkernews.net/2010/02/27/simple-wordpress-qr-code-plugin-to-create-2d-barcode-of-each-post-page/</link>
		<comments>http://www.walkernews.net/2010/02/27/simple-wordpress-qr-code-plugin-to-create-2d-barcode-of-each-post-page/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 15:16:12 +0000</pubDate>
		<dc:creator>Walker</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[QR Code]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.walkernews.net/?p=4169</guid>
		<description><![CDATA[This is a simple PHP function to create and display QR code of each post page in WordPress blog.]]></description>
			<content:encoded><![CDATA[I&#8217;ve just developed this simple WordPress QR Code plugin for those who are interested to generate and display <span class="subhead2">individual</span> QR Code of each post and page on a self-hosting, WordPress-powered blog.<br />
<span id="more-4169"></span><br />
There is no PHP file to &#8220;install&#8221; in the plugins directory. You neither have option to configure nor to activate or deactivate the said plugin in Manage Plugins page of dashboard.<br />
<br />All you have to do is edit the <code>functions.php</code> file of the <span class="subhead2">active WordPress theme</span> and <span class="subhead2">append</span> the following PHP code at the end of file content (create the functions.php file, in case it is not exist in your active WordPress theme):<br />
<pre>
&lt;?php
add_filter('the_content', 'wn_add_qr_code');

function wn_add_qr_code ($rawcontin){

        global $id;
        $wn_postlink = get_permalink($id);

        $rawcontin = '&lt;img style="float:left;margin:0px 0px 0px 0px;" src="http://chart.apis.google.com/chart?cht=qr&#038;chs=<span style="color:#F00;font-weight:bold;">60x60</span>&#038;chl=' . $wn_postlink . '" alt="" width="<span style="color:#F00;font-weight:bold;">60</span>" height="<span style="color:#F00;font-weight:bold;">60</span>" /&gt;' . $rawcontin;

        return $rawcontin;
}
?&gt;
</pre>
<br />The said plugin is activated automatically after saving the change in functions.php file. To deactivate this simple WordPress QR Code plugin (in my view), just delete the appended block of code will do.<br />
<br /><img src="http://www.walkernews.net/wp-content/uploads/2010/02/WordPress-QR-Code-Plugin.jpg" alt="WordPress QR Code plugin that can create and display QR Code of each post on the fly while the page is loading." title="WordPress QR Code plugin that can create and display QR Code of each post on the fly while the page is loading." width="464" height="131" /><br />
<br />If you would like to further customize the appearance of QR Code appears in the post page, you can do so by tweaking CSS properties of IMG tag or change the text in red (60&#215;60, value of width and height respectively) should you prefer a different QR Code image size.<br />
<blockquote>
I can&#8217;t figure out how to precisely display the QR Code next to post title. If you would like the 2D barcode appears in such a way, please refer to previous post.
</blockquote>
<br />The plugin, as shown, make use of Google Chart API to create and display individual QR Code of each blog post URL, <span class="subhead2">on the fly</span> while the page is loading. Hence, there is no need to pre-create the QR code and host it at web server for display.<br />
<br />It will work until the Google Chart API stops to allow free access by public. Since the displayed QR Code is fixed size, with respect to the width and height properties of IMG tag, there should be no much interruption to the layout of post page should the Google Chart API stops working. By then, just &#8220;deactivate&#8221; the plugin :-)<br />
<ul class="related_post"><li><a href="http://www.walkernews.net/2010/02/27/how-to-add-qr-code-of-each-post-page-in-wordpress/" title="How To Add QR Code Of Each Post Page In WordPress?">How To Add QR Code Of Each Post Page In WordPress?</a></li><li><a href="http://www.walkernews.net/2011/07/04/how-to-finetune-and-add-google-1-button-to-html-or-wordpress/" title="How To Finetune And Add Google +1 Button To HTML Or WordPress?">How To Finetune And Add Google +1 Button To HTML Or WordPress?</a></li><li><a href="http://www.walkernews.net/2011/01/16/how-to-find-a-wordpress-blog-rss-or-atom-feed-url/" title="How To Find A WordPress Blog RSS Or ATOM Feed URL?">How To Find A WordPress Blog RSS Or ATOM Feed URL?</a></li><li><a href="http://www.walkernews.net/2010/11/23/2-ways-to-add-facebook-like-button-with-comment-box-to-wordpress/" title="2 Ways To Add Facebook Like Button With Comment Box To WordPress">2 Ways To Add Facebook Like Button With Comment Box To WordPress</a></li><li><a href="http://www.walkernews.net/2010/11/09/how-to-add-facebook-share-button-to-wordpress-post-page/" title="How To Add Facebook Share Button To WordPress Post Page?">How To Add Facebook Share Button To WordPress Post Page?</a></li><li><a href="http://www.walkernews.net/2010/11/07/how-to-add-facebook-like-button-on-wordpress-post-page/" title="How To Add Facebook Like Button On WordPress Post Page?">How To Add Facebook Like Button On WordPress Post Page?</a></li><li><a href="http://www.walkernews.net/2010/06/06/firefox-hotkey-causes-right-to-left-display-in-wordpress-post-editor/" title="Firefox Hotkey Causes Right-To-Left Display In WordPress Post Editor">Firefox Hotkey Causes Right-To-Left Display In WordPress Post Editor</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.walkernews.net/2010/02/27/simple-wordpress-qr-code-plugin-to-create-2d-barcode-of-each-post-page/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

