<?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>Chris K Designs &#187; Chris K</title>
	<atom:link href="http://www.chriskdesigns.com/author/admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chriskdesigns.com</link>
	<description>WordPress tips, hacks, and plugins.</description>
	<lastBuildDate>Tue, 31 Aug 2010 04:56:24 +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>WordPress Dev 101: Hooks</title>
		<link>http://www.chriskdesigns.com/wordpress-dev-101-hooks/</link>
		<comments>http://www.chriskdesigns.com/wordpress-dev-101-hooks/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 03:58:09 +0000</pubDate>
		<dc:creator>Chris K</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress 101]]></category>

		<guid isPermaLink="false">http://www.chriskdesigns.com/?p=670</guid>
		<description><![CDATA[When I first got into WordPress development, I had no idea how the Core of WordPress was designed. I knew that I wanted my snippet of code to fire at a specific time, but short of hacking it into the theme I was using at the time, I had no clue how to achieve this. [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-510" title="WordPress Logo" src="http://www.chriskdesigns.com/wp-content/uploads/2010/05/grey-l.png" alt="" width="120" height="120" />When I first got into WordPress development, I had no idea how the Core of WordPress was designed. I knew that I wanted my snippet of code to fire at a specific time, but short of hacking it into the theme I was using at the time, I had no clue how to achieve this. It was then that I discovered the Hooks of WordPress. Think of WordPress&#8217; Hooks as the OnRamp to the rendering of your WordPress based site. Your code will sit dormant until the moment the Hook you have &#8216;Hooked&#8217; fires, then your code will jump in and be executed.<span id="more-670"></span><center><script type="text/javascript"><!--
google_ad_client = "pub-5875197947282333";
google_ad_slot = "6725358123";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</center></p>
<h5>Actions vs. Filters</h5>
<p>There are two types of Hooks used in WordPress, Actions and Filters.<br />
Actions are the hooks that the WordPress core launches at specific points during execution, or when specific events occur. Your plugin can specify that one or more of its PHP functions are executed at these points, using the Action API. These are most commonly used for the bulk of your plugin development.</p>
<p>Filters are the hooks that WordPress launches to modify text of various types before adding it to the database or sending it to the browser screen. Your plugin can specify that one or more of its PHP functions is executed to modify specific types of text at these times, using the Filter API.</p>
<h5>An Example</h5>
<p>Let&#8217;s take an example from my Updated Today Plugin. We&#8217;ll focus on the settings I have included for &#8220;Insert Into:&#8221;. The options are Header or Footer. What these reference is the functions wp_header() and wp_footer. Both are functions that exist in the index.php of your theme (or should exist). When a user selects the option of Footer as recommended, that tells the plugin to execute when wp_footer is run. How does it know when this is run? A Hook is how we know when it&#8217;s run. In the initial setup of the plugin, I tell the function &#8216;ck_wp_footer&#8217; to run when the hook (in this case the footer) &#8216;wp_footer&#8217; is executed.</p>
<p>[php]add_action(&#8216;wp_footer&#8217;, &#8216;ck_wp_footer&#8217;);[/php]</p>
<p>It&#8217;s as easy as that. Want your code to execute when the header is run?</p>
<p>[php]add_action(&#8216;wp_header&#8217;, &#8216;your_function_name&#8217;);[/php]</p>
<p>Keep in mind that some theme developers are now also building or creating their own hooks, so you can further customize your plugin/site to the max. If this isn&#8217;t quite making sense let&#8217;s have some real world experience. Below is a sample plugin for you to copy and paste into a new document named my-first-plugin.php.</p>
<p>[php]<br />
<?php<br />
/*<br />
   Plugin Name: My First Plugin<br />
   Plugin URI: http://www.chriskdesigns.com<br />
   Description: A template for your first plugin<br />
   Version: 0.1<br />
   Author: Chris Klosowski<br />
   Author URI: http://www.chriskdesigns.com<br />
   Copyright: 2010, Chris Klosowski<br />
*/</p>
<p>add_action('wp_head','my_first_plugin_header');</p>
<p>function my_first_plugin_header()<br />
{<br />
?><script type="text/javascript">
alert("I just hooked into the wp_header() function!");
</script><?php<br />
}<br />
?><br />
[/php]</p>
<p>Save it, and upload it into your wp-content/plugins/ folder of your WordPress site (use a development version if you don&#8217;t want this to impact your users). Activate the plugin and then visit your website. When WordPress starts to load the header, it executes the JavaScript alert we made and will wait to proceed until this alert is cleared. In this case it halts the loading of the site on purpose. I wanted you to see where the code executes, which we can identify as nothing on the page has loaded yet. If we were to change this to load in the footer, the entire page would load until the footer, then alert, and finish once you have clicked &#8216;OK&#8217;.</p>
<p>For a complete list of WordPress Hooks you can check out AdamBrown.info who keeps a complete <a href="http://adambrown.info/p/wp_hooks/version/3.0" target="_blank">list of Hooks</a> for quite a few versions of WordPress.</p>
<!-- PHP 5.x -->

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring-old">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=WordPress+Dev+101%3A+Hooks+-+http://b2l.me/ana8w3&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.chriskdesigns.com/wordpress-dev-101-hooks/&amp;t=WordPress+Dev+101%3A+Hooks" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.chriskdesigns.com/wordpress-dev-101-hooks/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-posterous">
			<a href="http://posterous.com/share?linkto=http://www.chriskdesigns.com/wordpress-dev-101-hooks/&amp;title=WordPress+Dev+101%3A+Hooks&amp;selection=When%20I%20first%20got%20into%20WordPress%20development%2C%20I%20had%20no%20idea%20how%20the%20Core%20of%20WordPress%20was%20designed.%20I%20knew%20that%20I%20wanted%20my%20snippet%20of%20code%20to%20fire%20at%20a%20specific%20time%2C%20but%20short%20of%20hacking%20it%20into%20the%20theme%20I%20was%20using%20at%20the%20time%2C%20I%20had%20no%20clue%20how%20to%20achieve%20this.%20It%20was%20then%20that%20I%20discovered%20the%20" rel="nofollow" class="external" title="Post this to Posterous">Post this to Posterous</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.chriskdesigns.com/wordpress-dev-101-hooks/&amp;title=WordPress+Dev+101%3A+Hooks" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.chriskdesigns.com/wordpress-dev-101-hooks/&amp;title=WordPress+Dev+101%3A+Hooks" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.chriskdesigns.com/wordpress-dev-101-hooks/&amp;title=WordPress+Dev+101%3A+Hooks" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.chriskdesigns.com/wordpress-dev-101-hooks/&amp;title=WordPress+Dev+101%3A+Hooks" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.chriskdesigns.com/wordpress-dev-101-hooks/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.chriskdesigns.com/wordpress-dev-101-hooks/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Change your WordPress domain quickly with Linux, MySQL, and sed</title>
		<link>http://www.chriskdesigns.com/change-your-wordpress-domain-quickly-with-linux-mysql-and-sed/</link>
		<comments>http://www.chriskdesigns.com/change-your-wordpress-domain-quickly-with-linux-mysql-and-sed/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 05:59:43 +0000</pubDate>
		<dc:creator>Chris K</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.chriskdesigns.com/?p=640</guid>
		<description><![CDATA[You have no idea how hard it was to refrain from using the command &#8216;sed&#8217; in a totally ridiculous homophoned title. Have you found yourself wanting to change the domain on an established WordPress installation, or even trying to replicate many times over the same exact WordPress database on a different domain? Yeah, me too. [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-652" title="find" src="http://www.chriskdesigns.com/wp-content/uploads/2010/08/find.png" alt="" width="102" height="102" />You have no idea how hard it was to refrain from using the command &#8216;sed&#8217; in a totally ridiculous <a href="http://en.wikipedia.org/wiki/Homophone">homophoned</a> title. Have you found yourself wanting to change the domain on an established WordPress installation, or even trying to replicate many times over the same exact WordPress database on a different domain? Yeah, me too. I&#8217;ve found while doing plug-in development, it helps to have the same database information copied over when I start with a new branch. Luckily, Linux comes to the rescue with the <em>sed</em> command. It&#8217;s a 3 step process. Export your source/current database. Search and replace with <em>sed</em>, and then import the database. Here&#8217;s a step by step for you.<br />
<span id="more-640"></span><center><script type="text/javascript"><!--
google_ad_client = "pub-5875197947282333";
google_ad_slot = "6725358123";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</center></p>
<p class="note">Note: you need to have access to a Linux command prompt and the MySQL database via command line in order to perform this by my steps</p>
<h5>Export&#8230;</h5>
<p>First, we need to make an export of your current database, we&#8217;ll do this with <em>mysqldump</em>:<br />
[text light=true]$ mysqldump -h yourhostnamehere -u YourUserName -pYourPasswordHere YourDatabaseName &gt; dumpfile.sql[/text]<br />
No, I didn&#8217;t forget a space after the -p flag. There is no space between the password flag, and the password itself.</p>
<h5>Search and Replace</h5>
<p>After that completes you should have a file named dumpfile.sql that contains your current database. Now it&#8217;s time to search and replace all references to the previous domain (we&#8217;ll call it domain-one.com) with our new domain (domain-two.com).<br />
[text light=true]$ sed -i &#8216;s/domain-one.com/domain-two.com/g&#8217; dumpfile.sql[/text]<br />
The &#8216;-i&#8217; flag is for <em>inline</em>. I simply replaces domain-one.com with domain-two.com where the command finds it. This means, any database settings or posts referencing the domain itself, will be altered, and therefore work when imported&#8230;.so on to importing.</p>
<h5>Importing the newly modified .sql backup</h5>
<p>[text light=true]$ mysql -h yourhostnamehere -u YourUserName -pYourPasswordHere YourDatabaseName &lt; dumpfile.sql[/text]<br />
This command with the &lt; or less than sign, pushes dumpfile.sql up to the database mentioned.</p>
<p>And there you have it, you just exported, modified, and imported an entire WordPress site including all categories, posts, users, etc&#8230;into a new database for use on a different site. Not so bad was it?</p>
<p>For more information on the <em>sed</em> command you can head over to <a href="http://www.brunolinux.com">brunolinux.com</a> for a <a href="http://www.brunolinux.com/02-The_Terminal/Find_and%20Replace_with_Sed.html">pretty decent sed tutorial</a> and more options.</p>
<!-- PHP 5.x -->

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring-old">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Change+your+WordPress+domain+quickly+with+Linux%2C+MySQL%2C+and+sed+-+http://b2l.me/ajteq6&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.chriskdesigns.com/change-your-wordpress-domain-quickly-with-linux-mysql-and-sed/&amp;t=Change+your+WordPress+domain+quickly+with+Linux%2C+MySQL%2C+and+sed" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.chriskdesigns.com/change-your-wordpress-domain-quickly-with-linux-mysql-and-sed/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-posterous">
			<a href="http://posterous.com/share?linkto=http://www.chriskdesigns.com/change-your-wordpress-domain-quickly-with-linux-mysql-and-sed/&amp;title=Change+your+WordPress+domain+quickly+with+Linux%2C+MySQL%2C+and+sed&amp;selection=You%20have%20no%20idea%20how%20hard%20it%20was%20to%20refrain%20from%20using%20the%20command%20%27sed%27%20in%20a%20totally%20ridiculous%20homophoned%20title.%20Have%20you%20found%20yourself%20wanting%20to%20change%20the%20domain%20on%20an%20established%20WordPress%20installation%2C%20or%20even%20trying%20to%20replicate%20many%20times%20over%20the%20same%20exact%20WordPress%20database%20on%20a%20differe" rel="nofollow" class="external" title="Post this to Posterous">Post this to Posterous</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.chriskdesigns.com/change-your-wordpress-domain-quickly-with-linux-mysql-and-sed/&amp;title=Change+your+WordPress+domain+quickly+with+Linux%2C+MySQL%2C+and+sed" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.chriskdesigns.com/change-your-wordpress-domain-quickly-with-linux-mysql-and-sed/&amp;title=Change+your+WordPress+domain+quickly+with+Linux%2C+MySQL%2C+and+sed" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.chriskdesigns.com/change-your-wordpress-domain-quickly-with-linux-mysql-and-sed/&amp;title=Change+your+WordPress+domain+quickly+with+Linux%2C+MySQL%2C+and+sed" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.chriskdesigns.com/change-your-wordpress-domain-quickly-with-linux-mysql-and-sed/&amp;title=Change+your+WordPress+domain+quickly+with+Linux%2C+MySQL%2C+and+sed" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.chriskdesigns.com/change-your-wordpress-domain-quickly-with-linux-mysql-and-sed/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.chriskdesigns.com/change-your-wordpress-domain-quickly-with-linux-mysql-and-sed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To: Remove the version from WordPress</title>
		<link>http://www.chriskdesigns.com/how-to-remove-the-version-from-wordpress/</link>
		<comments>http://www.chriskdesigns.com/how-to-remove-the-version-from-wordpress/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 15:41:43 +0000</pubDate>
		<dc:creator>Chris K</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.chriskdesigns.com/?p=628</guid>
		<description><![CDATA[Ok, you&#8217;ve read this title and thought, &#8220;Why would I want to remove the version from WordPress&#8230;in fact, what does he even mean!?&#8221;. By default, WordPress (since version 2.5+) includes the version of WordPress you are using in the HTML code of your site, and does not have an option to remove it. If you [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-medium wp-image-630 alignright" title="WPLock" src="http://www.chriskdesigns.com/wp-content/uploads/2010/08/WPLock-300x300.png" alt="" width="144" height="144" />Ok, you&#8217;ve read this title and thought, &#8220;Why would I want to remove the version from WordPress&#8230;in fact, what does he even mean!?&#8221;. By default, WordPress (since version 2.5+) includes the version of WordPress you are using in the HTML code of your site, and does not have an option to remove it.</p>
<p>If you view the source code of your site after you&#8217;ve loaded it up in your favorite browser you&#8217;ll see a line like so:</p>
<p>[html]<meta name="generator" content="WordPress 3.0">[/html]<br />
<span id="more-628"></span><center><script type="text/javascript"><!--
google_ad_client = "pub-5875197947282333";
google_ad_slot = "6725358123";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</center><br />
This seems harmless right? The first rule of security is to be obscure. This means giving people as little information about your configuration as possible. With the version number, it&#8217;s possible to narrow down possible exploits. In previous versions of WordPress (before 2.5) it was easy to just remove this from the theme&#8217;s header.php file. Well, that&#8217;s not the case anymore. Now it&#8217;s built into the WordPress Core and you have two options to remove it. First is to go into the functions.php file and pass a &#8220;blank&#8221; version by adding the following to the bottom of wp-includes/general-template.php but before the closing PHP tag (?&gt;):</p>
<p>[php]function i_want_no_generators()<br />
{<br />
return &#8221;;<br />
}<br />
add_filter(&#8216;the_generator&#8217;,'i_want_no_generators&#8217;);<br />
[/php]</p>
<p>Apply those changes, and save the file and you no longer have a version number reporting. Have no fear, the version will still report inside of the admin backend.</p>
<p>Alternatively, if you feel you need more security and don&#8217;t want to start messing with the WordPress core than this there is a great plug-in called <a href="http://wordpress.org/extend/plugins/secure-wordpress/">Secure WordPress</a>. This plug-in offers a wide array of security enhancements that include:</p>
<ul>
<li> Removing error-information on login-page</li>
<li> Adds index.php plugin-directory (virtual)</li>
<li> Removing the wp-version, except in admin-area</li>
<li> Removing Really Simple Discovery</li>
<li> Removing Windows Live Writer</li>
<li> Removing core update information for non-admins</li>
<li> Removing plugin-update information for non-admins</li>
<li> Removing theme-update information for non-admins (only WP 2.8 and higher)</li>
<li> Hids wp-version in backend-dashboard for non-admins</li>
<li> Adds string for use WP Scanner</li>
<li> Blocks bad queries</li>
<li> Validates your site with a free malware and vulnerabilities scan with SiteSecurityMonitor.com</li>
</ul>
<!-- PHP 5.x -->

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring-old">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=How+To%3A+Remove+the+version+from+WordPress+-+http://b2l.me/ajt9y3&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.chriskdesigns.com/how-to-remove-the-version-from-wordpress/&amp;t=How+To%3A+Remove+the+version+from+WordPress" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.chriskdesigns.com/how-to-remove-the-version-from-wordpress/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-posterous">
			<a href="http://posterous.com/share?linkto=http://www.chriskdesigns.com/how-to-remove-the-version-from-wordpress/&amp;title=How+To%3A+Remove+the+version+from+WordPress&amp;selection=Ok%2C%20you%27ve%20read%20this%20title%20and%20thought%2C%20%22Why%20would%20I%20want%20to%20remove%20the%20version%20from%20WordPress...in%20fact%2C%20what%20does%20he%20even%20mean%21%3F%22.%20By%20default%2C%20WordPress%20%28since%20version%202.5%2B%29%20includes%20the%20version%20of%20WordPress%20you%20are%20using%20in%20the%20HTML%20code%20of%20your%20site%2C%20and%20does%20not%20have%20an%20option%20to%20remove%20it.%0D%0A%0D%0A" rel="nofollow" class="external" title="Post this to Posterous">Post this to Posterous</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.chriskdesigns.com/how-to-remove-the-version-from-wordpress/&amp;title=How+To%3A+Remove+the+version+from+WordPress" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.chriskdesigns.com/how-to-remove-the-version-from-wordpress/&amp;title=How+To%3A+Remove+the+version+from+WordPress" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.chriskdesigns.com/how-to-remove-the-version-from-wordpress/&amp;title=How+To%3A+Remove+the+version+from+WordPress" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.chriskdesigns.com/how-to-remove-the-version-from-wordpress/&amp;title=How+To%3A+Remove+the+version+from+WordPress" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.chriskdesigns.com/how-to-remove-the-version-from-wordpress/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.chriskdesigns.com/how-to-remove-the-version-from-wordpress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>AdSense, WordPress, and You</title>
		<link>http://www.chriskdesigns.com/adsense-wordpress-and-you/</link>
		<comments>http://www.chriskdesigns.com/adsense-wordpress-and-you/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 03:31:04 +0000</pubDate>
		<dc:creator>Chris K</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[AdSense]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://www.chriskdesigns.com/?p=603</guid>
		<description><![CDATA[Ever wonder why the ads that Google AdSense decides to show for your blog post or site content doesn&#8217;t quite match up with what you were aiming for? Well it&#8217;s not surprise that the answer is simple, the ads are selected by a computer. Yeah, no duh right? The problem with computers doing all the [...]]]></description>
			<content:encoded><![CDATA[<p>Ever wonder why the ads that Google AdSense decides to show for your blog post or site content doesn&#8217;t quite match up with what you were aiming for? Well it&#8217;s not surprise that the answer is simple, the ads are selected by a computer. Yeah, no duh right? The problem with computers doing all the work is, they don&#8217;t have the ability to distinguish context, importance, or even content as a whole. They can only look at the words you type and compare with a database that it has waiting with hundreds of possible ads. What does this mean for you? I&#8217;m glad you asked.</p>
<h5>Analogies are like your history professor&#8230;</h5>
<p>&#8230;They can get long winded and boring. Getting relevant ads from any automated ad provider service starts with your writing style. Do you sculpt your posts or pages with heavy analogies? If you do, you might be your own worst enemy. The analogy, while very useful in getting a human to understand your context, is essentially a site crawler&#8217;s nightmare. It has no clue that your post is about your actual topic and instead notices a large amount of time spent on the topic that is your analogy. If you are going to try and use analogies to get your point across, do it quickly and concisely.<br />
<span id="more-603"></span><center><script type="text/javascript"><!--
google_ad_client = "pub-5875197947282333";
google_ad_slot = "6725358123";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</center></p>
<h5>Google&#8217;s Section Targeting</h5>
<p>You can also get Google&#8217;s AdSense crawlers to take note of <em>or</em> ignore specific content by wrapping it with the following tags:<br />
To use this content:<br />
[html]<!-- google_ad_section_start --><br />
Your content here<br />
<!-- google_ad_section_end --><br />
[/html]</p>
<p>To ignore this content:<br />
[html]<!-- google_ad_section_start(weight=ignore) --><br />
Your content here<br />
<!-- google_ad_section_end --><br />
[/html]</p>
<p>Some hints on using this, tell AdSense to ignore your comments (some of those can be quite off topic), related posts (these can carry titles that don&#8217;t relate to your content), and possibly your sidebar if you have aggregated content from twitter or other social networks. More can be found about <a href="https://www.google.com/adsense/support/bin/answer.py?hl=en&#038;answer=23168">Section Targeting over at the AdSense Help Documentation</a></p>
<p>Update: I failed to link a plug-in that will help you out with adding these tags for WordPress called <a href="http://wordpress.org/extend/plugins/auto-google-ad-section/">Auto Google Ad Section</a></p>
<h5>Make inserting ads easier</h5>
<p>Tired of coping and pasting that AdSense JavaScript section into your posts? I was too. Go download the <a href="http://wordpress.org/extend/plugins/adsense-manager/">AdSense Manager plug-in for WordPress</a>. After you have it properly configured all you need to add into your post is an identifying bit of text that looks like:<br />
[text][ad-1][/text]<br />
The plug-in makes an identifying text string in the [ and ], then wherever you post it, it replaces that string with your AdSense code. Remember though, only 3 ad impressions are allowed per page with Google AdSense, so don&#8217;t go overboard.</p>
<h5>Image Ads vs. Text Ads</h5>
<p>This debate could go on forever, there are plenty of people who say that image ads get more clicks and text ads have higher payouts. I don&#8217;t know for sure, but what I do know is that so much of that depends on your target audience. Geared at teenagers? They will probably be attracted to image based ads that are moving. Inline text ads that match the design scheme of your blog might work for other groups of visitors. The truth is, you have to find that exact match for your visitors so make sure you use your Google Analytics to keep track of clicks and traffic.</p>
<p>Hopefully those few things will help you integrate AdSense into your WordPress site quicker and with less agony of configuration. I know it made my life much easier.</p>
<!-- PHP 5.x -->

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring-old">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=AdSense%2C+WordPress%2C+and+You+-+http://b2l.me/ajtnt6&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.chriskdesigns.com/adsense-wordpress-and-you/&amp;t=AdSense%2C+WordPress%2C+and+You" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.chriskdesigns.com/adsense-wordpress-and-you/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-posterous">
			<a href="http://posterous.com/share?linkto=http://www.chriskdesigns.com/adsense-wordpress-and-you/&amp;title=AdSense%2C+WordPress%2C+and+You&amp;selection=Ever%20wonder%20why%20the%20ads%20that%20Google%20AdSense%20decides%20to%20show%20for%20your%20blog%20post%20or%20site%20content%20doesn%27t%20quite%20match%20up%20with%20what%20you%20were%20aiming%20for%3F%20Well%20it%27s%20not%20surprise%20that%20the%20answer%20is%20simple%2C%20the%20ads%20are%20selected%20by%20a%20computer.%20Yeah%2C%20no%20duh%20right%3F%20The%20problem%20with%20computers%20doing%20all%20the%20work" rel="nofollow" class="external" title="Post this to Posterous">Post this to Posterous</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.chriskdesigns.com/adsense-wordpress-and-you/&amp;title=AdSense%2C+WordPress%2C+and+You" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.chriskdesigns.com/adsense-wordpress-and-you/&amp;title=AdSense%2C+WordPress%2C+and+You" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.chriskdesigns.com/adsense-wordpress-and-you/&amp;title=AdSense%2C+WordPress%2C+and+You" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.chriskdesigns.com/adsense-wordpress-and-you/&amp;title=AdSense%2C+WordPress%2C+and+You" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.chriskdesigns.com/adsense-wordpress-and-you/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.chriskdesigns.com/adsense-wordpress-and-you/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The 411 on 404s</title>
		<link>http://www.chriskdesigns.com/the-411-on-404s/</link>
		<comments>http://www.chriskdesigns.com/the-411-on-404s/#comments</comments>
		<pubDate>Sun, 01 Aug 2010 23:02:03 +0000</pubDate>
		<dc:creator>Chris K</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.chriskdesigns.com/?p=571</guid>
		<description><![CDATA[The 404 &#8211; File Not Found error. Its the darkest corner of your website that you probably don&#8217;t encounter too often, but do you know how often others are getting them on your site? Odds are, you don&#8217;t. One way to increase visitors (and more importantly keep visitors) is to avoid the 404 error, or [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-598" title="749px-I-404.svg" src="http://www.chriskdesigns.com/wp-content/uploads/2010/08/749px-I-404.svg_-300x239.png" alt="" width="120" height="95" /><a href="http://en.wikipedia.org/wiki/HTTP_404">The 404 &#8211; File Not Found error</a>. Its the darkest corner of your website that you probably don&#8217;t encounter too often, but do you know how often others are getting them on your site? Odds are, you don&#8217;t. One way to increase visitors (and more importantly keep visitors) is to avoid the 404 error, or embrace it by planning for it. Part of development is to always test the &#8216;negative case&#8217;. The case in which you know your code will fail. The same holds true in URLS. What happens if someone goes to a page or URL that doesn&#8217;t exist on your site? Go ahead, try it&#8230;I&#8217;ll wait. &#8211; There, that wasn&#8217;t so hard was it? What did you find? For most of you using WordPress, it&#8217;ll be a standard 404 page that your theme is using. Not too bad, but how many people are actually seeing this, usually content-less, page? Let&#8217;s find out.</p>
<p><span id="more-571"></span></p>
<h2>Finding the 404s</h2>
<p>Most hosting providers will give you some sort of coarse statistics, but they don&#8217;t typically cover 404&#8242;s. To find this, we must manually look at the logs to get a better sense of the traffic seeing these unsightly errors. For this section, I&#8217;m working with a Linux based hosting environment in which I have SSH access.</p>
<p><strong>Locate your log files</strong><br />
Mine happen to be in a folder named logs of my root hosting account. Your&#8217;s may be somewhere else but we need to get into that folder via a command line.</p>
<p class="code">cd html/stats/logs</p>
<p><strong>Locate lines in the logs with 404s</strong><br />
Once in this log files folder we&#8217;re going to use the Linux command &#8216;grep&#8217; to search all files for the string &#8217;404&#8242;.</p>
<p class="code">grep 404 *.*</p>
<p>You will now see a large printout that contains many lines of stuff that looks like the following:</p>
<p class="code">html/stats/logs/ex20100727000001-97.74.24.35.log:208.115.111.249 &#8211; - [26/Jul/2010:22:43:16 -0700] &#8220;GET www.chriskdesigns.com/2009/04/08/death-of-a-medium/ HTTP/1.1&#8243; 404 16804 &#8220;-&#8221; &#8220;Mozilla/5.0 (com<br />
patible; DotBot/1.1; http://www.dotnetdotcom.org/, crawler@dotnetdotcom.org)&#8221;</p>
<p>That&#8217;s a request to your site that ended in a 404 &#8211; File Not found. The important parts are:<br />
<strong>The URL the person tried to visit</strong></p>
<p class="code">www.chriskdesigns.com/2009/04/08/death-of-a-medium/</p>
<p><strong>The HTTP Request version and the result (a 404 here)</strong></p>
<p class="code">HTTP/1.1&#8243; 404</p>
<p>So now I know that this page is missing&#8230;was I aware of this before? If you have been to my site before you might recognize this as a valid post called &#8216;<a href="http://www.chriskdesigns.com/death-of-a-medium/">Death of a Medium</a>&#8216;. So why the 404? I had changed my Permalink structure at one point in time. If someone links to your previous Permalink Structure, after you change it will result in a 404. This is why <a href="http://www.chriskdesigns.com/3-things-to-do-with-a-new-wordpress-site/">I suggest setting your Permalink structure upon setup</a>, and not changing. I learned my lesson the hard way.</p>
<p>Why is it good to know these 404&#8242;s? If you have change anything about your Permalinks, spelling in a title after it&#8217;s published, or a tag/category has been removed, you can use your 404 errors to see where the problems are and possibly correct them with a .htaccess redirect.<br />
<center><script type="text/javascript"><!--
google_ad_client = "pub-5875197947282333";
google_ad_slot = "6725358123";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</center></p>
<h2>The Solution</h2>
<p>So now we know how to see our 404 errors, but how do we correct them? If you are using an Apache based web server, you can use a .htaccess file to redirect people accordingly. Here are a few common .htaccess redirects that I find useful for WordPress users.</p>
<p><strong>Redirect from domain.com/blog to just domain.com</strong></p>
<p class="code">rewriterule ^<em>previous-folder-name</em>(.*)$ &#8220;http\:\/\/<em>your-domain-here</em>\/$1&#8243; [R=301,L]</p>
<p><strong>Modified a Post/Page Title (note: only pertains to what is after domain.com/</strong></p>
<p class="code">RewriteCond %{REQUEST_URI} /.*<em>mispelled-url-without-domain</em>.*$ [NC]<br />
RewriteRule ^(.*)helicoper(.*)$ /$1<em>correctly-spelled-url-without=domain</em>$2 [R=301,L]</p>
<p><strong>Monetize</strong><br />
Something else you can do with your 404 page is monetize it. I know, sounds a little odd but it&#8217;s becoming more common in this world of backlinks. If you blog on a specific topic or a series of topics, you can setup an Amazon Associates Store and paste that code into the 404.php file of your theme. This will allow you to possibly make some money from those missed pages, and hopefully keep your visitors engaged in your site.</p>
<p><strong>Humor</strong><br />
One of my favorite use of the 404 is humor. Here&#8217;s an article that someone wrote, listing <a href="http://blogof.francescomugnai.com/2008/08/the-100-most-funny-and-unusual-404-error-pages/">their favorite 100 examples of humor used in a 404 page</a>.</p>
<!-- PHP 5.x -->

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring-old">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=The+411+on+404s+-+http://b2l.me/ajt9y5&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.chriskdesigns.com/the-411-on-404s/&amp;t=The+411+on+404s" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.chriskdesigns.com/the-411-on-404s/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-posterous">
			<a href="http://posterous.com/share?linkto=http://www.chriskdesigns.com/the-411-on-404s/&amp;title=The+411+on+404s&amp;selection=The%20404%20-%20File%20Not%20Found%20error.%20Its%20the%20darkest%20corner%20of%20your%20website%20that%20you%20probably%20don%27t%20encounter%20too%20often%2C%20but%20do%20you%20know%20how%20often%20others%20are%20getting%20them%20on%20your%20site%3F%20Odds%20are%2C%20you%20don%27t.%20One%20way%20to%20increase%20visitors%20%28and%20more%20importantly%20keep%20visitors%29%20is%20to%20avoid%20the%20404%20error%2C%20or%20emb" rel="nofollow" class="external" title="Post this to Posterous">Post this to Posterous</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.chriskdesigns.com/the-411-on-404s/&amp;title=The+411+on+404s" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.chriskdesigns.com/the-411-on-404s/&amp;title=The+411+on+404s" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.chriskdesigns.com/the-411-on-404s/&amp;title=The+411+on+404s" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.chriskdesigns.com/the-411-on-404s/&amp;title=The+411+on+404s" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.chriskdesigns.com/the-411-on-404s/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.chriskdesigns.com/the-411-on-404s/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
