<?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>Blog Tutorials &#187; How-To</title>
	<atom:link href="http://blogtuts.com/category/how-to-tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogtuts.com</link>
	<description>Blog Tutorials, Tools, and Resources</description>
	<lastBuildDate>Thu, 04 Nov 2010 20:41:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Separating Trackbacks and Comments in WordPress 2.7+</title>
		<link>http://blogtuts.com/separating-trackbacks-and-comments-in-wordpress-2-7/</link>
		<comments>http://blogtuts.com/separating-trackbacks-and-comments-in-wordpress-2-7/#comments</comments>
		<pubDate>Sun, 30 Aug 2009 16:19:43 +0000</pubDate>
		<dc:creator>Kyle Eslick</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress Tutorials]]></category>
		<category><![CDATA[WordPress Code]]></category>
		<category><![CDATA[WordPress Comments]]></category>
		<category><![CDATA[WordPress Hacks]]></category>
		<category><![CDATA[WordPress Pingbacks]]></category>
		<category><![CDATA[WordPress Tips]]></category>
		<category><![CDATA[WordPress Trackbacks]]></category>

		<guid isPermaLink="false">http://blogtuts.com/?p=124</guid>
		<description><![CDATA[Interested in separating your trackbacks and comments on your WordPress blog?   This blog tutorial should have you covered, whether you use a modern WordPress installation, or an older (pre 2.7) version of WordPress.   Below you&#8217;ll find we&#8217;ve put together a tutorial for both types of comment loops. For WordPress 2.7+ Installations Locate the following code [...]<div class="posts"><h3>Related Posts</h3></div><ul>
<li><a href='http://blogtuts.com/wordpress-code-recent-comments-top-commentators/' rel='bookmark' title='Code: Add Recent Comments and Top Comments to WordPress'>Code: Add Recent Comments and Top Comments to WordPress</a></li>
<li><a href='http://blogtuts.com/code-adding-edit-buttons-to-wordpress/' rel='bookmark' title='Code: Adding Edit Buttons to WordPress'>Code: Adding Edit Buttons to WordPress</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>Interested in separating your trackbacks and comments on your WordPress blog?   This <a href="http://blogtuts.com/">blog tutorial</a> should have you covered, whether you use a modern WordPress installation, or an older (pre 2.7) version of WordPress.   Below you&#8217;ll find we&#8217;ve put together a tutorial for both types of comment loops.</p>
<h3><strong>For WordPress 2.7+ Installations</strong></h3>
<p>Locate the following code in your index.php or single.php file (whichever file your theme uses to show single post pages):</p>
<p><code>&lt;?php comments_template(); ?&gt;</code></p>
<p><strong>Replace</strong> that code with the following:</p>
<p><code>&lt;?php comments_template('', true); ?&gt;</code></p>
<p>That is it for that file.   Now go to your <strong>comments.php</strong> file and locate the following code:</p>
<p><code>&lt;?php if ( have_comments() ) : ?&gt;</code></p>
<p>Immediately <strong>below</strong> that code, insert the following code:</p>
<p><code>&lt;?php if ( ! empty($comments_by_type['comment']) ) : ?&gt;</code></p>
<p>Okay, once that is done, you&#8217;ll next need to scroll down a little further (still in the comments.php file) and locate the following code:</p>
<p><code>&lt;?php wp_list_comments(); ?&gt;</code></p>
<p>You&#8217;ll want to <strong>replace</strong> that code with the below code:</p>
<p><code>&lt;?php wp_list_comments('type=comment'); ?&gt;</code></p>
<p>Immediately below this function you should see the following code:</p>
<p><code>&lt;/ol&gt;</code></p>
<p>Directly <strong>below</strong> that code, place the following code:</p>
<p><code>&lt;?php endif; ?&gt;</code></p>
<p>That should take care of the comment loop.  The last step is to insert the code which will display the trackbacks/pingbacks.  This can be placed anywhere below the code we just hacked above:</p>
<p><code>&lt;?php if ( ! empty($comments_by_type['pings']) ) : ?&gt;<br />
&lt;h3 id="pings"&gt;Trackbacks/Pingbacks&lt;/h3&gt;<br />
&lt;ol&gt;<br />
&lt;?php wp_list_comments('type=pings'); ?&gt;<br />
&lt;/ol&gt;<br />
&lt;?php endif; ?&gt;</code></p>
<p>Some people prefer to display their trackbacks and pingbacks below the comment form or somewhere else out of the way, so this is really up to you!  Just place the above code where you want to show them.   If you don&#8217;t like them showing at all on your blog, just don&#8217;t place the above code at all.</p>
<p>Once that is done, it is time to give it a try.  Check it out on your blog and let us know how everything turns out!</p>
<h3><strong>For Pre-WordPress 2.7 Installations:</strong></h3>
<p>Prior to WordPress 2.7, the comment form wasn&#8217;t nearly as functional as it is with the newer versions and also included a lot more code, but it is still possible to separate the trackbacks and comments using the old comment loop.     If you&#8217;d like to separate your trackbacks from your comments on a WordPress 2.6 or earlier installation, here is the steps you&#8217;ll need to take.</p>
<p>First, access your comments.php file and grab the following code:</p>
<p><code>&lt;?php foreach ($comments as $comment) : ?&gt;</code></p>
<p>Immediately <strong>after</strong> the above code, you&#8217;ll want to place the following code:</p>
<p><code>&lt;?php $comment_type = get_comment_type(); ?&gt;<br />
&lt;?php if($comment_type == 'comment') { ?&gt;</code></p>
<p>Next, scroll down a little bit and locate the following code:</p>
<p><code>&lt;?php endforeach; /* end for each comment */ ?&gt;</code></p>
<p>Immediately <strong>before</strong> the above code, you&#8217;ll want to place this code:</p>
<p><code>&lt;?php } /* End of is_comment statement */ ?&gt;</code></p>
<p>This will filter out all of the trackbacks and pingbacks from your main comments loop. Now we need to create a second comments loop to display the trackbacks and pingbacks.  Almost immediately below the code from step 2 you should find this code:</p>
<p><code>&lt;?php else : // this is displayed if there are no comments so far ?&gt;</code></p>
<p>Immediately <strong>before</strong> the above code, you&#8217;ll want to place this code:</p>
<p><code>&lt;h3&gt;Trackbacks&lt;/h3&gt;<br />
&lt;ol&gt;<br />
&lt;?php foreach ($comments as $comment) : ?&gt;<br />
&lt;?php $comment_type = get_comment_type(); ?&gt;<br />
&lt;?php if($comment_type != 'comment') { ?&gt;<br />
&lt;li&gt;&lt;?php comment_author_link() ?&gt;&lt;/li&gt;<br />
&lt;?php } ?&gt;<br />
&lt;?php endforeach; ?&gt;<br />
&lt;/ol&gt;</code></p>
<p>You can adjust this code to display how you want to, including using a different header if you have a specific look for your header 3.</p>
<p>If you&#8217;ve tried this tutorial, let us know how it worked for you in the comments!</p>
<div class="posts"><h3>Related Posts</h3></div><ul>
<li><a href='http://blogtuts.com/wordpress-code-recent-comments-top-commentators/' rel='bookmark' title='Code: Add Recent Comments and Top Comments to WordPress'>Code: Add Recent Comments and Top Comments to WordPress</a></li>
<li><a href='http://blogtuts.com/code-adding-edit-buttons-to-wordpress/' rel='bookmark' title='Code: Adding Edit Buttons to WordPress'>Code: Adding Edit Buttons to WordPress</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://blogtuts.com/separating-trackbacks-and-comments-in-wordpress-2-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How-To: Display Most Recent Twitter Entry on Your WordPress Blog</title>
		<link>http://blogtuts.com/most-recent-twitter-entry-wordpress-code/</link>
		<comments>http://blogtuts.com/most-recent-twitter-entry-wordpress-code/#comments</comments>
		<pubDate>Sat, 20 Jun 2009 13:22:59 +0000</pubDate>
		<dc:creator>Kyle Eslick</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[WordPress Tutorials]]></category>
		<category><![CDATA[Most Recent Tweets]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Twitter Code]]></category>
		<category><![CDATA[Twitter WordPress]]></category>
		<category><![CDATA[WordPress Tutorial]]></category>

		<guid isPermaLink="false">http://blogtuts.com/?p=75</guid>
		<description><![CDATA[Proud of your tweets?   Maybe you run a business blog and would like to integrate your Twitter feed?   For WordPress users, adding your most recent tweet to your WordPress blog is actually very easy.   Simply add a little code snippet in your blog&#8217;s sidebar where you want to display your most recent tweet, then add [...]<div class="posts"><h3>Related Posts</h3></div><ul>
<li><a href='http://blogtuts.com/twitter-tweet-this-button-code/' rel='bookmark' title='Code: Add a &#8220;Tweet This&#8221; Button'>Code: Add a &#8220;Tweet This&#8221; Button</a></li>
<li><a href='http://blogtuts.com/code-how-to-display-recent-posts-in-wordpress/' rel='bookmark' title='Code:  How to Display Recent Posts in WordPress'>Code:  How to Display Recent Posts in WordPress</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>Proud of your tweets?   Maybe you run a business blog and would like to integrate your Twitter feed?   For WordPress users, adding your most recent tweet to your WordPress blog is actually very easy.   Simply add a little code snippet in your blog&#8217;s sidebar where you want to display your most recent tweet, then add your Twitter username!</p>
<p>Here is the code you’ll need to easily add the most recent Twitter entry:<span id="more-75"></span></p>
<p><code>&lt;?php<br />
// Your twitter username.<br />
$username = "TwitterUsername";<br />
// Prefix - some text you want displayed before your latest tweet.<br />
// (HTML is OK, but be sure to escape quotes with backslashes: for example href=\"link.html\")<br />
$prefix = "";<br />
// Suffix - some text you want display after your latest tweet. (Same rules as the prefix.)<br />
$suffix = "";<br />
$feed = "http://search.twitter.com/search.atom?q=from:" . $username . "&amp;rpp=1";<br />
function parse_feed($feed) {<br />
$stepOne = explode("&lt;content type=\"html\"&gt;", $feed);<br />
$stepTwo = explode("&lt;/content&gt;", $stepOne[1]);<br />
$tweet = $stepTwo[0];<br />
$tweet = str_replace(”&amp;lt;”, “&lt;”, $tweet);<br />
$tweet = str_replace(”&amp;gt;”, “&gt;”, $tweet);<br />
return $tweet;<br />
}<br />
$twitterFeed = file_get_contents($feed);<br />
echo stripslashes($prefix) . parse_feed($twitterFeed) . stripslashes($suffix);<br />
?&gt;</code></p>
<p>Simply add your Twitter username where it says &#8220;TwitterUsername&#8221; in the code above!</p>
<div class="posts"><h3>Related Posts</h3></div><ul>
<li><a href='http://blogtuts.com/twitter-tweet-this-button-code/' rel='bookmark' title='Code: Add a &#8220;Tweet This&#8221; Button'>Code: Add a &#8220;Tweet This&#8221; Button</a></li>
<li><a href='http://blogtuts.com/code-how-to-display-recent-posts-in-wordpress/' rel='bookmark' title='Code:  How to Display Recent Posts in WordPress'>Code:  How to Display Recent Posts in WordPress</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://blogtuts.com/most-recent-twitter-entry-wordpress-code/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How-To: Prevent Google from Indexing Your Images</title>
		<link>http://blogtuts.com/prevent-google-indexing-images/</link>
		<comments>http://blogtuts.com/prevent-google-indexing-images/#comments</comments>
		<pubDate>Sat, 20 Jun 2009 13:13:05 +0000</pubDate>
		<dc:creator>Kyle Eslick</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Google Images]]></category>
		<category><![CDATA[Google Indexing]]></category>
		<category><![CDATA[Prevent Images from Indexing]]></category>
		<category><![CDATA[WordPress Tutorials]]></category>

		<guid isPermaLink="false">http://blogtuts.com/?p=73</guid>
		<description><![CDATA[For most bloggers, traffic and monetization is the driving force behind our blogs and motivation to blog.  Therefore, why would someone who operates any image-heavy blog who would want to prevent a lot of potential traffic from Google&#8217;s image search? There are actually a number of reasons bloggers would want to keep their pictures from being [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>For most bloggers, traffic and monetization is the driving force behind our blogs and motivation to blog.  Therefore, why would someone who operates any image-heavy blog who would want to prevent a lot of potential traffic from Google&#8217;s image search?</p>
<p>There are actually a number of reasons bloggers would want to keep their pictures from being indexed by Google, a few examples being bloggers who like to post personal pictures, or custom make their pictures and don&#8217;t want others to take them.<span id="more-73"></span></p>
<p>If you feel that you fit into this category, Google has made it very easy for you to opt out of having your images indexed.  Simply place the following code into your blog&#8217;s header file above the &lt; /head &gt; tag:</p>
<p><code>&lt;meta name="robots" content="noimageindex"&gt;</code></p>
<p>If your site has a problem with people taking your content (including the pictures) via scrapers, etc., then there is a chance Google will still index them when they index that person&#8217;s website. Another route you can take is to place images into a folder then add a disallow to your Robots.txt file.</p>
<p>If you are a WordPress user, this is fairly easy as by default, as we already have pictures in either our Images folder of our theme, or the uploads folder (unless you&#8217;ve assigned a custom path for your images). You can add something like the following to your Robots.txt file:</p>
<p><code>User-agent: *<br />
Disallow: /images/</code></p>
<p>or</p>
<p><code>User-agent: *<br />
Disallow: /uploads/</code></p>
<p>Any questions? Leave them in the comments!</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://blogtuts.com/prevent-google-indexing-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

