<?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>Mike Van WinkleMeta Tag Titles and Descriptions for Your WordPress site. | Mike Van Winkle</title>
	<atom:link href="http://www.mikevanwinkle.com/tag/meta-tags/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mikevanwinkle.com</link>
	<description>New Media Consultant and Wordpress Freak</description>
	<lastBuildDate>Fri, 30 Jul 2010 13:18:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Meta Tag Titles and Descriptions for Your WordPress site.</title>
		<link>http://www.mikevanwinkle.com/wordpress/meta-tag-titles-and-descriptions-for-your-wordpress-site/</link>
		<comments>http://www.mikevanwinkle.com/wordpress/meta-tag-titles-and-descriptions-for-your-wordpress-site/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 13:46:27 +0000</pubDate>
		<dc:creator>Mike Van Winkle</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[meta tags]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Wordpress How To]]></category>

		<guid isPermaLink="false">http://www.mikevanwinkle.com/?p=364</guid>
		<description><![CDATA[There are many good plugins out there the help you easily add meta tags to your site. All-in-one-SEO is probably the most popular of all the options. But there several reason why you may want to manually add this code to your &#8230; <a href="http://www.mikevanwinkle.com/wordpress/meta-tag-titles-and-descriptions-for-your-wordpress-site/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There are many good plugins out there the help you easily add meta tags to your site. All-in-one-SEO is probably the most popular of all the options. But there several reason why you may want to manually add this code to your template.</p>
<p>For one, you may be a template designer and want your templates to come pre-installed with this SEO friend feature.</p>
<p>Second, you may be having issues with Facebook link sharing not working. WordPress plugins use the wp_head() hook to access your template. But you have no control over the order. If you are using more than a dozen plugins your meta tags can get buried under tons of other code. This can prevent some bots from finding them. Indeed on several of my site Facebook&#8217;s bot was not finding them.</p>
<p>Third, it is just always good to do things without plugins if possible. Call it Occum&#8217;s Razor of web site building, the less code you use, the better.</p>
<p>Luck for us, it is extremely simple to add code for meta tags and descriptions without knowing much about wordpress or PHP.</p>
<p>Open the header.php file in your theme and paste in the following code:</p>
<pre>
<div id="_mcePaste">&lt;?php if(is_singular()) { ?&gt;</div>
<div id="_mcePaste">&lt;?php</div>
<div id="_mcePaste">global $post;</div>
<div id="_mcePaste">?&gt;</div>
<div id="_mcePaste">&lt;?php $recent = new WP_query('p='.$post-&gt;ID);</div>
<div id="_mcePaste">while($recent-&gt;have_posts()) : $recent-&gt;the_post(); ?&gt;</div>
<div id="_mcePaste">&lt;meta name="title" content="&lt;?php the_title(); ?&gt;"&gt;</div>
<div id="_mcePaste">&lt;meta name="description" content="&lt;?php the_content_rss('', TRUE, '', 50); ?&gt;"&gt;</div>
<div id="_mcePaste">&lt;?php endwhile; ?&gt;</div>
<div id="_mcePaste">&lt;?php } else { ?&gt;</div>
<div id="_mcePaste">&lt;meta name="title" content="&lt;?php bloginfo('title'); ?&gt;"&gt;</div>
<div id="_mcePaste">&lt;meta name="description" content="&lt;?php bloginfo('description'); ?&gt;"&gt;</div>
<div id="_mcePaste">&lt;?php } ?&gt;</div>
</pre>
<p>So what&#8217;s going on here? First, we&#8217;re checking to see if the post is a single post using the WordPress Conditional tag &lt;?php if(is_singular()); ?&gt;<em> </em>because we&#8217;ll to pull the title and the description of the individual post for our meta tags. But to do this, we need to get some information about the post, which is why we use the call <code><em>global $post</em></code>. This will give us information about the current post. Particularly it allows us access to <code>$post-&gt;ID</code> to query information about the post using <code>WP_query</code>.</p>
<p>The query we us looks like this:</p>
<pre><code>$recent = new WP_query('p='.$post-&gt;ID); </code></pre>
<p>Once we have the query we put it into the standard wordpress loop:</p>
<pre><code>while($recent-&gt;have_posts()) : $recent-&gt;the_post();</code></pre>
<p>Then we use the standard WordPress tag &lt;?php the_title(); ?&gt; to pull in the META TITLE and &lt;? the_content_rss() ?&gt; to get the description. Notice, we are not using &lt;?php the_excerpt(); ?&gt;. This is because this WordPress tag prints the excerpt with a &#8220;read more&#8221; link in it. This will seriously screw up your theme. Using <a title="The Content RSS" href="http://codex.wordpress.org/Function_Reference/the_content_rss">&lt;?php the_content_rss(); ?&gt;</a> allows us to specify how many words of the content to pull in. But the second parameter has to be set to TRUE to avoid pulling in a &#8220;read more&#8221; link.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikevanwinkle.com/wordpress/meta-tag-titles-and-descriptions-for-your-wordpress-site/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>SEO Basics</title>
		<link>http://www.mikevanwinkle.com/marketing/seo/seo-basics/</link>
		<comments>http://www.mikevanwinkle.com/marketing/seo/seo-basics/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 17:43:23 +0000</pubDate>
		<dc:creator>Mike Van Winkle</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[meta tags]]></category>
		<category><![CDATA[search engine optimization]]></category>
		<category><![CDATA[search engines]]></category>
		<category><![CDATA[SEO Basics]]></category>
		<category><![CDATA[title tags]]></category>
		<category><![CDATA[web marketing]]></category>

		<guid isPermaLink="false">http://www.mikevanwinkle.com/?p=326</guid>
		<description><![CDATA[This post reviews some of the basics of SEO for small organizations and non-profits. I review meta tags, title tags, and no follow links. ]]></description>
			<content:encoded><![CDATA[<h3>Good Content</h3>
<p>In many ways, the technical aspects of SEO are becoming automated. If you use an open-source content management system, or a custom system built within the last two years, chances are you are already well optimize &#8230; at least technically.</p>
<p>The real competitive advantage lies in developing good content that people want to read, that has &#8220;viral&#8221; potential, and yet still advances your overall mission.</p>
<h3>Clean URLS</h3>
<p><span style="font-weight: normal;">In general the url of your page should reinforce the keywords you are trying to target. The link to this post is &#8220;<span style="color: #888888;">http://www.mikevanwinkle.com/marketing/seo/</span></span><span style="font-weight: normal;"><strong><span style="color: #888888;">seo-basics</span></strong></span><span style="font-weight: normal;">/&#8221;. Notice the term &#8220;SEO Basics&#8221; is included and that my url reflects a ration (human centered) organization.  An example of a bad or &#8220;dirty&#8221; url would be &#8220;<span style="color: #888888;">http://www.mikevanwinkle.com/?p=23&amp;permission=1&amp;rel=12312092</span>&#8220;. If your links aren&#8217;t clean, talk to your website provider. It should be relatively easy for them to give you the necessary capabilities.</span></p>
<h3>Title Tags</h3>
<p>Title tags tell google what to put in the browser window title when the page is open. For instance, the title of this page is &#8220;SEO Basics | Mike Van Winkle&#8221;. That title is controlled by the following tags, which you can view in the source code.</p>
<p><span style="color: #888888;">&lt;title&gt;SEO Basics  | Mike Van Winkle&lt;/title&gt;</span></p>
<p><span style="color: #888888;"><span style="color: #000000;">Note that the keywords are first in the title, the name of the site is second.</span></span></p>
<h3><span style="white-space: pre-wrap;">Meta Tags</span></h3>
<p>The most important meta tags are the &#8220;Keyword&#8221; and &#8220;Description&#8221; tags. Here are the tags for this page.</p>
<p><span style="color: #888888;">&lt;meta name=&#8221;description&#8221; content=&#8221;This post reviews some of the basics of SEO for small organizations and non-profits. I review meta tags, title tags, and no follow links.&#8221; /&gt;</span></p>
<p><span style="color: #888888;">&lt;meta name=&#8221;keywords&#8221; content=&#8221;meta tags,search engine optimization,search engines,seo,seo basics,title tags,web marketing&#8221; /&gt;</span></p>
<p><span style="color: #888888;"><span style="color: #000000;">How do you change the meta tags for your page? Unfortunately this is something that must be provided by your Content Management System. Many open-source systems like <a title="Find out more about WordPress" href="http://www.wordpress.org">WordPress</a> and <a title="Find out more about drupal" href="http://www.drupal.org">Drupal</a> have capabilities for this built in. Custom content management systems, which I strongly discourage, often require custom programming to enable this capability.</span></span></p>
<h3>Heading Tags</h3>
<p>Heading Tags set of headings and subheadings in your content. In general you should try to use these tags to reinforce your keywords, but without annoying the heck out of your readers.</p>
<h1>&lt;h1&gt;SEO Basics&lt;/h1&gt;</h1>
<h2>&lt;h2&gt;SEO Basics&lt;/h2&gt;</h2>
<h3>&lt;h3&gt;SEO Basics&lt;/h3&gt;</h3>
<p>Keep in mind that your heading tags will also change the formatting.</p>
<h3>Anchor Text/Link Attributes</h3>
<p>We also discussed anchor text and link attributes, like titles and nofollows.</p>
<p><span style="color: #888888;">&lt;a href=&#8221;http://www.yourdomain.com&#8221; title=&#8221;LINK TITLE&#8221; rel=&#8221;nofollow&#8221;&gt;ANCHOR TEXT&lt;/a&gt;</span></p>
<p>The link title is a great opportunity to reinforce your keywords. The title for this link might be &#8220;More SEO Basics&#8221; or something similar. The same goes for the Anchor Text. Most content management systems have this capability built in. You can tell whether a link is title by simply putting your mouse over the link. Titled links will show the title in a hover box. Mouseover this link to see what I mean: <a title="SEO Basics" href="http://www.mikevanwinkle.com/marketing/seo/seo-basics/">SEO Basics</a>.</p>
<p>You want to pay attention to the anchor text you are using to link to other pages within your site, as well as the anchor text other sites are using to link to you.</p>
<h3>Image Alt Attribute</h3>
<p>Similar to link titling, the Image &#8220;alt&#8221; attribute gives you an opportunity to reinforce a specific keyword or set of keywords. For instance, if you put your mouse over the image below you&#8217;ll see that a hoverbox with the terms &#8220;Seo Basics&#8221; pops up. This is because I have set the alt attribute in the image code. I can also set the image title to reflect the same keywords. Again, most content management systems these days give you the option to set these attributes as part of the normal course of posting an image. If yours doesn&#8217;t, call your provider and demand that it does.</p>
<p style="text-align: center;"><a href="http://www.mikevanwinkle.com/wp-content/uploads/2009/10/google.page.rank.explained.jpg"><img class="aligncenter size-medium wp-image-336" title="seo basics" src="http://www.mikevanwinkle.com/wp-content/uploads/2009/10/google.page.rank.explained-300x281.jpg" alt="seo basics" width="300" height="281" /></a></p>
<p style="text-align: center;"><span style="color: #808080;">&lt;img title=&#8221;<strong>seo basics</strong>&#8221; src=&#8221;http://www.mikevanwinkle.com/wp-content/uploads/2009/10/google.page.rank.explained-300&#215;281.jpg&#8221; alt=&#8221;<strong>seo basics</strong>&#8221; width=&#8221;300&#8243; height=&#8221;281&#8243; /&gt;</span></p>
<h3><span style="color: #808080;"><span style="color: #000000;">SEO Basics Resources</span></span></h3>
<p><span style="color: #808080;"><span style="color: #000000;"><a title="Google trends" href="http://trends.google.com">Google Trends</a>: http://trends.google.com (hot keywords)</span></span></p>
<p><span style="color: #808080;"><span style="color: #000000;"><a title="SEOMoz" href="http://www.seomoz.org">SEOMoz.org</a>: http://www.seomoz.org (overall SEO resource)</span></span></p>
<p><span style="color: #808080;"><span style="color: #000000;"><a title="Yahoo Site Explorer" href="http://">Yahoo Site Explorer</a>: https://siteexplorer.search.yahoo.com/ (Who&#8217;s linking to your site)</span></span></p>
<p><span style="color: #808080;"><span style="color: #000000;"><a title="SpyFu" href="http://www.spyfu.com/">SpyFu</a>: http://www.spyfu.com/ (research your competition)</span></span></p>
<p><span style="color: #808080;"><span style="font-weight: normal;"><span style="color: #000000;"><br />
</span></span></span></p>
<p style="text-align: center;"><span style="color: #808080;"><br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikevanwinkle.com/marketing/seo/seo-basics/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
