<?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>Michael E. Chancey Jr. &#187; Wordpress</title>
	<atom:link href="http://michael.chanceyjr.com/tag/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://michael.chanceyjr.com</link>
	<description></description>
	<lastBuildDate>Fri, 20 May 2011 03:43:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>WordPress Keywords and Description Meta Tags</title>
		<link>http://michael.chanceyjr.com/useful-code/wordpress-keywords-and-description-meta-tags/</link>
		<comments>http://michael.chanceyjr.com/useful-code/wordpress-keywords-and-description-meta-tags/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 15:15:20 +0000</pubDate>
		<dc:creator>Michael E. Chancey Jr.</dc:creator>
				<category><![CDATA[Useful Code]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://michael.chanceyjr.com/?p=550</guid>
		<description><![CDATA[The code below allows you to add keywoards and description meta tags to any wordpress theme. Simple copy the below code and insert it into the header.php of your theme somewhere inside of the &#60;head&#62;&#60;/head&#62; tag. You could also simply download the plugin I wrote for this as well. Although I have submitted it to [...]]]></description>
			<content:encoded><![CDATA[<p>The code below allows you to add keywoards and description meta tags to any wordpress theme.  Simple copy the below code and insert it into the header.php of your theme somewhere inside of the &lt;head&gt;&lt;/head&gt; tag.</p>
<p>You could also simply download the plugin I wrote for this as well.  Although I have submitted it to WordPress.org they have not posted it yet so here is a link in the mean time.  Please note the plugin is a little more customizable then the code below.</p>
<p><a href="http://michael.chanceyjr.com/free-stuff/auto-keywords-and-description-generator/">-Auto Keywords and Description Generator-</a></p>
<h3>//Code</h3>
<hr/>
<pre class="brush: php;">
&lt;?php
$keywords = &quot;&quot;;
$description = &quot;&quot;;

if(is_home() || is_front_page())
{
	//LOAD KEYWORDS FROM USER SPECIFIED STRING
	$keywords = &quot;Insert your homepage keywords here&quot;;

	//LOAD DESCRIPTION FROM BLOGINFO
	$description = bloginfo('description');
}
elseif(is_single())
{
	//LOAD POST TITLE AS DESCRIPTION
	$description = $post-&gt;post_title;

	//BUILD LIST OF KEYWORDS FROM TAGS
	$tags = wp_get_post_tags($post-&gt;ID);
	foreach($tags as $tag)
		$keywords = $keywords . $tag-&gt;name . &quot;, &quot;;
}
elseif(is_category())
{
	//LOAD CATEGORY DESCRIPTION
	$keywords = single_cat_title('', false);
	$description = category_description();
}
?&gt;
&lt;meta name=&quot;keywords&quot; content=&quot;&lt;?php echo $keywords ?&gt;&quot; /&gt;
&lt;meta name=&quot;description&quot; content=&quot;&lt;?php echo $description ?&gt;&quot; /&gt;
</pre>



Share


	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Wordpress%20Keywords%20and%20Description%20Meta%20Tags%20-%20http%3A%2F%2Fmichael.chanceyjr.com%2Fuseful-code%2Fwordpress-keywords-and-description-meta-tags%2F" title="Twitter"><img src="http://michael.chanceyjr.com/site/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fmichael.chanceyjr.com%2Fuseful-code%2Fwordpress-keywords-and-description-meta-tags%2F&amp;title=Wordpress%20Keywords%20and%20Description%20Meta%20Tags&amp;bodytext=The%20code%20below%20allows%20you%20to%20add%20keywoards%20and%20description%20meta%20tags%20to%20any%20wordpress%20theme.%20%20Simple%20copy%20the%20below%20code%20and%20insert%20it%20into%20the%20header.php%20of%20your%20theme%20somewhere%20inside%20of%20the%20%26lt%3Bhead%26gt%3B%26lt%3B%2Fhead%26gt%3B%20tag.%0D%0A%0D%0AYou%20could%20also%20simply%20d" title="Digg"><img src="http://michael.chanceyjr.com/site/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fmichael.chanceyjr.com%2Fuseful-code%2Fwordpress-keywords-and-description-meta-tags%2F&amp;title=Wordpress%20Keywords%20and%20Description%20Meta%20Tags" title="StumbleUpon"><img src="http://michael.chanceyjr.com/site/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fmichael.chanceyjr.com%2Fuseful-code%2Fwordpress-keywords-and-description-meta-tags%2F&amp;title=Wordpress%20Keywords%20and%20Description%20Meta%20Tags&amp;notes=The%20code%20below%20allows%20you%20to%20add%20keywoards%20and%20description%20meta%20tags%20to%20any%20wordpress%20theme.%20%20Simple%20copy%20the%20below%20code%20and%20insert%20it%20into%20the%20header.php%20of%20your%20theme%20somewhere%20inside%20of%20the%20%26lt%3Bhead%26gt%3B%26lt%3B%2Fhead%26gt%3B%20tag.%0D%0A%0D%0AYou%20could%20also%20simply%20d" title="del.icio.us"><img src="http://michael.chanceyjr.com/site/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://michael.chanceyjr.com/useful-code/wordpress-keywords-and-description-meta-tags/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

