<?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>Coder Plus &#187; Wordpress</title>
	<atom:link href="http://coderplus.com/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://coderplus.com</link>
	<description></description>
	<lastBuildDate>Sun, 19 Sep 2010 03:53:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>New Facebook Like Button For WordPress</title>
		<link>http://coderplus.com/2010/08/new-facebook-like-button-for-wordpress/</link>
		<comments>http://coderplus.com/2010/08/new-facebook-like-button-for-wordpress/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 20:03:42 +0000</pubDate>
		<dc:creator>Coder</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[like-button]]></category>

		<guid isPermaLink="false">http://coderplus.com/?p=390</guid>
		<description><![CDATA[Facebook has rolled out an improved version of its like Button. The new Facebook like button looks like  the compact Official Tweet Button. The Facebook Like button will show the no of likes your post received.The like button has some changes from the older version in the way the user is allowed to like and unlike(It now a little difficult than before to unlike :P)]]></description>
			<content:encoded><![CDATA[<p>Facebook has rolled out an improved version of its like Button. The new Facebook like button looks like  the compact Official Tweet Button. The Facebook Like button will show the no of likes your post received.The like button has some changes from the older version in the way the user is allowed to like and unlike(It now a little difficult than before to unlike <img src='http://coderplus.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> )</p>
<p><img title="New Facebook Like button for WordPress" src="http://lh6.ggpht.com/_u4gySN2ZgqE/TGw27yECBeI/AAAAAAAABmU/3y8yv6Lv8sA/image%5B7%5D.png?imgmax=800" alt="" width="552" height="187" /></p>
<p>Edit your  WordPress theme and insert the following code into your WordPress Post Loop(If you want it to appear on Post pages only, then edit single.php.Otherwise you will have to edit multiple theme  files)</p>
<div class="code">
<pre>&lt;iframe src="http://www.facebook.com/plugins/like.php?href=&lt;?php echo urlencode(get_permalink($post-&gt;ID)); ?&gt;&amp;amp;layout=<span style="color: red;">button_count</span>&amp;amp;show_faces=<span style="color: red;">false</span>&amp;amp;width=<span style="color: red;">450</span>&amp;amp;action=<span style="color: red;">like</span>&amp;amp;colorscheme=<span style="color: red;">light</span>&amp;amp;font=<span style="color: red;">arial</span>" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:40px;"&gt;&lt;/iframe&gt;</pre>
</div>
<p>Parameters of the Like Button<br />
1.layout=button_count will provide you with the new like button.If you change it to layout=standard , then you will get the older version of the like button<br />
2. show_faces=false If you set this parameter to true(show_faces=true), then it will show faces of those who like your post<br />
3.There are three different color schemes available . The code has the light color scheme. To use the other two color schemes change colorscheme=light to colorscheme=dark or colorscheme=evil<br />
4.you can also change the font used by changing the font parameter<br />
You can change font=arial to any of</p>
<p>1. font=lucida+grande<br />
2. font=segoe+ui<br />
3. font=tahoma<br />
4. font=trebuchet+ms<br />
5. font=verdana</p>
<p>5.To change the text that appears on the button, you can change action=like to action=recommend</p>
<p><a href="http://www.bloggerplugins.org/2010/08/new-facebook-like-button-for-blogger.html" target="_blank">New Facebook Like Button for Blogger</a></p>
]]></content:encoded>
			<wfw:commentRss>http://coderplus.com/2010/08/new-facebook-like-button-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tweet This Text Link For WordPress</title>
		<link>http://coderplus.com/2010/08/tweet-this-text-link-for-wordpress/</link>
		<comments>http://coderplus.com/2010/08/tweet-this-text-link-for-wordpress/#comments</comments>
		<pubDate>Sun, 15 Aug 2010 06:54:30 +0000</pubDate>
		<dc:creator>Coder</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://coderplus.com/2010/08/tweet-this-text-link-for-wordpress/</guid>
		<description><![CDATA[Are you trying to add a Tweet This Text link to your WordPress blog? Then you have come to the right place. Some of you might feel that the Official Tweet Button is not fully Customizable and slows down your site by using JavaScript. To add the tweet link to your wordpress blog, Edit your [...]]]></description>
			<content:encoded><![CDATA[<p>Are you trying to add a Tweet This Text link to your WordPress blog? Then you have come to the right place. Some of you might feel that the Official Tweet Button is not fully Customizable and slows down your site by using JavaScript.</p>
<p>To add the tweet link to your wordpress blog, Edit your Template’s single.php file and add the following code</p>
<div class="code">
<pre>&lt;a href="http://twitter.com/share?text=&lt;?php echo urlencode(the_title()); ?&gt;&amp;amp;url=&lt;?php echo urlencode(the_permalink()); ?&gt;&amp;amp;via=twitter&amp;amp;related=&lt;?php echo urlencode("coderplus:Wordpress Tips, jQuery and more"); ?&gt;" title="Share on Twitter" rel="nofollow" target="_blank"&gt;Tweet This&lt;/a&gt;</pre>
</div>
<p>inside the post loop.</p>
<p>In the code you can edit <strong>via=twitter</strong> with your  twitter handle.Ex.If your twitter username is martin then you can change it to <strong>via=martin</strong> you can also edit the related account by editing <strong>related=coderplus: WordPress Tips, jQuery and more</strong></p>
<p>If you have any queries, leave a comment and i will help you out <img src='http://coderplus.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://coderplus.com/2010/08/tweet-this-text-link-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Twitter Tweet Button Plugin  for Wordpres with #Hashtags</title>
		<link>http://coderplus.com/2010/08/twitter-tweet-button-plugin-for-wordpress/</link>
		<comments>http://coderplus.com/2010/08/twitter-tweet-button-plugin-for-wordpress/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 15:09:41 +0000</pubDate>
		<dc:creator>Coder</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[tweet button]]></category>
		<category><![CDATA[tweet counter]]></category>

		<guid isPermaLink="false">http://coderplus.com/?p=340</guid>
		<description><![CDATA[Twitter has now officially released a new Tweet Button which shows a count of the number of times your post was shared on twitter . The button comes in three styles and has a new URL shortener(t.co).  If you are having a wordpress blog, then you can easily add the tweet button to your blog using the WP-TweetButton Plugin.]]></description>
			<content:encoded><![CDATA[<p>Twitter has now officially released a new Tweet Button which shows a count of the number of times your post was shared on twitter . The button comes in three styles and has a new URL shortener(t.co)</p>
<p>If you are having a wordpress blog, then you can easily add the tweet button to your blog using the WordPress Tweet Button Plugin. </p>
<p>Upload the WP-TweetButton plugin to your blog, Activate it, and configure it from the TweetButton Menu in your WordPress Dashboard.wee<br />
Here is a screenshot of the Configuration page.<br />
<a href="http://coderplus.com/wp-content/uploads/2010/08/twitter-tweet-button-plugin-for-wordpress.jpg"></a><a href="http://coderplus.com/wp-content/plugins/wp-tweetbutton/screenshot-1.png"><img class="alignnone size-medium wp-image-357" title="screenshot-1" src="http://coderplus.com/wp-content/plugins/wp-tweetbutton/screenshot-1.png" alt="screenshot-1" width="600" /></a></p>
<p><strong>= Features =</strong><br />
* Live count of tweets from Twitter<br />
* Allows you to change the source which you retweet, E.g. &#8220;RT @yourname&#8221; or &#8220;via @yourname&#8221;<br />
* Allows you to change the syntax of your tweet Eg:&lt;Tweet Text&gt; &lt;short link&gt; via @yourname,RT @yourname &lt;Tweet Text&gt; &lt;short link&gt;<br />
* Allows you to add<strong> post categories</strong> and <strong>tags</strong> as <strong>hash tags</strong> in your tweets<br />
* Allow you to set the type of the Tweet Counter(Vertical,Horizontal or none)<br />
* Allows you to set the language of the button<br />
* Allows you to recommend a second twitter account<br />
* Allows you to add CSS styles<br />
* Automatically adds the tweet button without the need of any template modification<br />
* Allows further customization and Manual code insertion into the template<br />
* <strong>Allows you manually  to add a text  link to tweet your posts</strong><br />
* <strong>Allows you to use the categories and tags of the post as hash tags in your tweet</strong><br />
* <strong>Use the post author&#8217;s twitter profile on his posts using <code>%post_author%</code> and <code>%post_author_bio%</code></strong><br />
The plugin is capable of automatically inserting the Tweet button on all of your posts. But if you need to have more control over where the tweet button is placed, then choose the &#8220;Manually add the Function Call to the Template&#8221; option from your Tweet Button Configuration Page. Now edit your template and add the following code wher you want the tweet button to appear.</p>
<div class="code">
<pre>&lt;?php if(function_exists('the_tweetbutton')) the_tweetbutton();?&gt;</pre>
</div>
<p>If you dont need the counter, and want to create a Text Link to share the item, then you can use the_tweetlink() function</p>
<p>Eg:The code below will output a simple text link to share your posts</p>
<div class="code">
<pre>&lt;a href="&lt;?php the_tweetlink();?&gt;" title="Tweet" target="_blank"&gt;Tweet This&lt;/a&gt;</pre>
</div>
<p><a href="http://wordpress.org/extend/plugins/wp-tweetbutton/">Download The WP-TweetButton Plugin from the WP Plugin Directory</a></p>
<p># wordpress twitter button #wordpress official tweet button #wordpress official twitter button #wordpress tweet button</p>
]]></content:encoded>
			<wfw:commentRss>http://coderplus.com/2010/08/twitter-tweet-button-plugin-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>43</slash:comments>
		</item>
		<item>
		<title>Beautiful Post Thumbnails for your WordPress Blog</title>
		<link>http://coderplus.com/2009/11/beautiful-post-thumbnails-for-your-wordpress-blog/</link>
		<comments>http://coderplus.com/2009/11/beautiful-post-thumbnails-for-your-wordpress-blog/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 11:58:01 +0000</pubDate>
		<dc:creator>Coder</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://coderplus.com/?p=242</guid>
		<description><![CDATA[In this tutorial, we will discuss the different methods to generate thumbnails and display them elegantly alongside your posts. This tutorial is meant to be used for the Wordpress Blogging Platform. We will do it in the timthumb, custom field and in the Wordpress Way]]></description>
			<content:encoded><![CDATA[<p>In this tutorial, we will discuss the different methods to generate thumbnails and display them elegantly alongside your posts. This tutorial is meant to be used for the WordPress Blogging Platform. We will do it in the timthumb, custom field and in the WordPress Way</p>
<h3>Usning the Timthumb thumbnail Generator</h3>
<p><strong>Timthumb</strong> is a thumbnail Generator script written in PHP and it requires the GD library. You can get the <strong>timthumb</strong> script from <a href="http://www.darrenhoyt.com/2008/04/02/timthumb-php-script-released/" target="_blank">Darren Hoyt</a> at <a href="http://timthumb.googlecode.com/svn/trunk/timthumb.php" target="_blank">Google Code</a> . First of all lets thank Darren for this magical script.</p>
<h3>How Stuff Works?</h3>
<p>For a neat look, we would be displaying post thumbnails along with post summarieson your wordpress home page and other archive pages. Goto the <a title="Post Thumbnails - Demo" href="http://coderplus.com/demos/postthumbnails/" target="_blank">DEMO PAGE</a> and see how it looks on WordPress’s default Kubrick Theme.Now lets see how this works.We have two methods for selecting the image used for generating the post thumbnail.</p>
<p>1. Specifying the Image from which the thumbnail should be generated(We have to do it for each post by using a WordPress Custom Field)</p>
<p>2. By automatically using the first image in the post for generating the post thumbnail(thumbnail will be generated automatically from the first image in the post)</p>
<h3>Our Plan</h3>
<p>Here we will use a combination of the above two methods. If the post has a Custom Image field value then we will use that specified image for generating the thumbnail .If it doesn&#8217;t have any image url specified in the custom field, then we will use the first image in the post, and if the post doesn&#8217;t have any images and it doesn&#8217;t have an image URL in the custom field, then we wont use the post thumbnail.This is a very simple Code. So everyone would be able to figure out how it works. First of all we have to get the timthumb script on your server.Create a folder named <strong>thumbnails</strong> in your <strong>wp-content</strong> folder . Upload the <strong>timthumb.php</strong> script into this folder. Make a subfolder named <strong>cache</strong> within the <strong>wp-content/thumbnails</strong> folder and change the permissions of this <strong>cache</strong> folder to <strong>777</strong>.</p>
<p>Before  we start lets get familiar with some WordPress Template tags.</p>
<h3>Template Tags</h3>
<p>1.<strong>&lt;?php the_content();  ?&gt;</strong> – This template tag outputs the entire wordpress post.</p>
<p>2.<strong>&lt;?php the_excerpt(); ?&gt;</strong> – This template tag outputs the post summary.If you haven&#8217;t manually added  a post excerpt,then wordpress will automatically generate one for you.So this template tag can be used to display the post summary.</p>
<h3>Ok lets do it.</h3>
<p>We will start with the WordPress home page. So edit your theme’s index.php file. You would probably see something similar to</p>
<div class="code">
<pre>&lt;?php the_content();  ?&gt;</pre>
</div>
<p>. We will have to replace this with</p>
<div class="code">
<pre>&lt;?php the_excerpt(); ?&gt; .</pre>
</div>
<p>Now we are half way through. Your wordpress home page will now be displaying post summaries instead of showing the entire post.Now we have to display the thumbnails alongside the post summary.For this you will have to add the thumbnail generation(+display) code just above</p>
<div class="code">
<pre>&lt;?php the_excerpt(); ?&gt;</pre>
</div>
<h3>Code For Thumbnail Generation + Display</h3>
<div class="code">
<pre>  &lt;?php  $custom_values = get_post_custom_values("<strong>thumb_source</strong>");
   if (isset($custom_values[0]))  $image_source= $custom_values[0];
  else
  {$id =$post-&gt;ID;
  $the_content =$wpdb-&gt;get_var("SELECT post_content FROM   $wpdb-&gt;posts WHERE ID = $id");
  $pattern = '!&lt;img.*?src="(.*?)"!';
  preg_match_all($pattern, $the_content, $matches);
  $image_source = $matches['1'][0];
  }if (isset($image_source))
  {?&gt;
  &lt;a href="&lt;?php the_permalink();?&gt;"&gt;&lt;img class="cute-post-thumbnail" src="<strong>http://www.yourblog.com</strong>/wp-content/thumbnails/timthumb.php?src=&lt;?php echo $image_source;?&gt;&amp;w=<strong>180</strong>&amp;h=<strong>180</strong>&amp;zc=<strong>1</strong>&amp;q=<strong>85</strong>"  alt="&lt;?php the_title();?&gt;"&gt;&lt;/a&gt;
  &lt;?php }?&gt;</pre>
</div>
<h3>Ok what does this Code do?</h3>
<p>It tries to fetch the custom image field ,  <strong>thumb_source</strong> (you can use any custom field name.In this tutorial we will use <strong>thumb_source </strong>as our custom field name) . If you have added a custom field <strong>thumb_source</strong> with the image URL, then the code will use that particular  image for thumbnail generation.If it is unable to find the custom field, then it will scan the post to see if it has any images.If it has got any images, then it will use the first image in the post for generating the thumbnail.If the post doesn’t have any image and it doesn’t have a custom field image, then the script wont do anything.In the code you should replace <strong>http://www.yourblog.com</strong> with your wordpress blog’s URL. You can also alter the highlighted values in the code.</p>
<blockquote><p><strong>w=180</strong> the width of the generated thumbnail</p>
<p><strong>h=180</strong> the height of the thumbnail</p>
<p><strong>zc=1</strong> this will crop the image.if you set it to 0, it will resize instead.</p>
<p><strong>q=85</strong> this determines the quality of the generated thumbnail. maximum value is 100</p></blockquote>
<p>Now you should see the thumbnail image and the post summary on the WordPress home page. The thumbnail image is not styled properly.This is our next task.</p>
<h3>Styling the The Thumbnail Image</h3>
<p>Now we have to edit our theme’s stylesheet file(style.css) and add the following styles there</p>
<div class="code">
<pre>.cute-post-thumbnail{float:left;width:190px;height:190px;padding:10px;margin-right:10px;margin-bottom:10px;background:#d5d6d7;border: 3px solid #ccc;}</pre>
</div>
<p>You can surely alter the styles and make it even more beautiful and appealing .</p>
<p>Now we are finished with the wordpress home page.Now repeat the same process for the wordpress archive pages(tag,category search and other archives) by editing archives.php,search.php etc  in a similar manner.</p>
<h3>Extra Notes</h3>
<p>1.<strong>Timthumb</strong> can generate thumbnails of internal images only.So if you are using images hosted on some other sites,then <strong>timthumb</strong> wont be able to generate a thumbnail for you.</p>
<p>2.If you don’t want to use <strong>timthumb</strong>, you can make thumbnails by your own and then upload it somewhere and add the image URL as custom field.In this case you will have to modify the thumbnail code to</p>
<div class="code">
<pre>&lt;?php  $custom_values = get_post_custom_values("thumb_source");
if (isset($custom_values[0]))  {$image_source= $custom_values[0];?&gt;
&lt;a href="&lt;?php the_permalink();?&gt;"&gt;&lt;img class="cute-post-thumbnail" src="&lt;?php echo $image_source;?&gt;"  alt="&lt;?php the_title();?&gt;"&gt;&lt;/a&gt;
&lt;?php }?&gt;</pre>
</div>
<h3>Doing it in the WordPress Way</h3>
<p>As krembo99 has suggested in the comment,we can make use of the default wordpress functions to grab the thumbnails.To do this First of all goto your Wodpress Admin Panel &gt; Settings &gt; Media and set the thumbnail size to the size that you want.</p>
<p>Now use this Thumbnail generation Code instead</p>
<pre>&lt;?php
  $attachments = get_children( array('post_parent'  =&gt; get_the_ID(),
                'post_type'      =&gt; 'attachment',
                'numberposts'    =&gt; 1, // show all -1
                'post_status'    =&gt; 'inherit',
                'post_mime_type' =&gt; 'image',
                'order'          =&gt; 'ASC',
                'orderby'        =&gt; 'menu_order ASC'
                ) );

if($attachments)
{foreach ( $attachments as $attachment_id =&gt; $attachment ) {?&gt;
    &lt;a href="&lt;?php the_permalink();?&gt;"&gt;&lt;?php echo wp_get_attachment_image( $attachment_id,'thumbnail' );?&gt;&lt;/a&gt;;
&lt;?php }}?&gt;</pre>
<p>Now here the image is assigned a class attachment-thumbnail . So we will have to alter the styles to</p>
<pre>.attachment-thumbnail{float:left;width:190px;height:190px;padding:10px;margin-right:10px;margin-bottom:10px;background:#d5d6d7;border: 3px solid #ccc;}</pre>
<p>This method will use the thumbnail version of the first image in your post.</p>
<h3>Doing in on the New Beta Version Of WordPress using WordPress Template Tags</h3>
<p>Wordprerss 2.9, which is now in beta comes with some additional template tags.So the code becomes lighter</p>
<pre>&lt;?php if ( has_post_image() ) : ?&gt;
    &lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;?php the_post_image('thumbnail'); ?&gt;&lt;/a&gt;
&lt;?php endif; ?&gt;</pre>
<p>If you require help with the following code, post a comment and I will respond to your inquiry .</p>
]]></content:encoded>
			<wfw:commentRss>http://coderplus.com/2009/11/beautiful-post-thumbnails-for-your-wordpress-blog/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
	</channel>
</rss>

