<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: WordPress meta description using post excerpt, category description and post ID</title>
	<atom:link href="http://codegrad.hub.ph/wordpress-meta-description-using-post-excerpt-category-description-and-post-id/feed/" rel="self" type="application/rss+xml" />
	<link>http://codegrad.hub.ph/wordpress-meta-description-using-post-excerpt-category-description-and-post-id/</link>
	<description></description>
	<lastBuildDate>Tue, 24 Jan 2012 11:45:10 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Greten</title>
		<link>http://codegrad.hub.ph/wordpress-meta-description-using-post-excerpt-category-description-and-post-id/#comment-22519</link>
		<dc:creator>Greten</dc:creator>
		<pubDate>Wed, 17 Aug 2011 10:17:18 +0000</pubDate>
		<guid isPermaLink="false">http://codegrad.hub.ph/?p=9#comment-22519</guid>
		<description>Hi Tyldor, sorry I didn&#039;t know of any way to do that and I could not imagine of any reason to use variables in meta tags. Good day!</description>
		<content:encoded><![CDATA[<p>Hi Tyldor, sorry I didn&#8217;t know of any way to do that and I could not imagine of any reason to use variables in meta tags. Good day!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tyldor prestiti personali</title>
		<link>http://codegrad.hub.ph/wordpress-meta-description-using-post-excerpt-category-description-and-post-id/#comment-22136</link>
		<dc:creator>Tyldor prestiti personali</dc:creator>
		<pubDate>Sun, 10 Jul 2011 22:11:22 +0000</pubDate>
		<guid isPermaLink="false">http://codegrad.hub.ph/?p=9#comment-22136</guid>
		<description>Hi, do you know if there is a way to generate meta tag description that contains variabile? ( example for category page)

Something like &quot;this is the meta description for this tag: $tag&quot;

Ps: sorry for my english but it&#039;s not my mother language.</description>
		<content:encoded><![CDATA[<p>Hi, do you know if there is a way to generate meta tag description that contains variabile? ( example for category page)</p>
<p>Something like &#8220;this is the meta description for this tag: $tag&#8221;</p>
<p>Ps: sorry for my english but it&#8217;s not my mother language.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greten</title>
		<link>http://codegrad.hub.ph/wordpress-meta-description-using-post-excerpt-category-description-and-post-id/#comment-22112</link>
		<dc:creator>Greten</dc:creator>
		<pubDate>Thu, 07 Jul 2011 10:48:16 +0000</pubDate>
		<guid isPermaLink="false">http://codegrad.hub.ph/?p=9#comment-22112</guid>
		<description>Hi Matthew

Excellent solution you got there. Hopefully, I will be able to try it as soon as possible (no time to test codes lately being busy to my other blogs and my full time work). 

If the strip_tags is what I think it is, I think it should also be placed in the category description line since category description also puts paragraph tag by default.</description>
		<content:encoded><![CDATA[<p>Hi Matthew</p>
<p>Excellent solution you got there. Hopefully, I will be able to try it as soon as possible (no time to test codes lately being busy to my other blogs and my full time work). </p>
<p>If the strip_tags is what I think it is, I think it should also be placed in the category description line since category description also puts paragraph tag by default.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Slyman</title>
		<link>http://codegrad.hub.ph/wordpress-meta-description-using-post-excerpt-category-description-and-post-id/#comment-22097</link>
		<dc:creator>Matthew Slyman</dc:creator>
		<pubDate>Mon, 04 Jul 2011 13:18:07 +0000</pubDate>
		<guid isPermaLink="false">http://codegrad.hub.ph/?p=9#comment-22097</guid>
		<description>Truly excellent article: 10/10. WordPress Codex was sending me around in circles—this article gave me precisely what I wanted, straight away.

One small improvement (for WordPress 3.1.4 with theme derived from TwentyTen): my theme uses HTML tags in the_excerpt(), e.g. for the &quot;Continue reading &#8594;&quot; hyperlink.

I find the following solution more satisfactory and complete:

	if (is_single())	{ echo(strip_tags(get_the_excerpt())); }
	elseif (is_category())	{ echo category_description(); }
	elseif (is_home())	{ bloginfo(&#039;name&#039;);bloginfo(&#039;description&#039;);}
	else			{ bloginfo(&#039;name&#039;);echo(&#039;&amp;#x2014&#039;);wp_title(&#039;&#124;&#039;,true);}

Note the PHP function, &quot;strip_tags(get_the_excerpt())&quot;</description>
		<content:encoded><![CDATA[<p>Truly excellent article: 10/10. WordPress Codex was sending me around in circles—this article gave me precisely what I wanted, straight away.</p>
<p>One small improvement (for WordPress 3.1.4 with theme derived from TwentyTen): my theme uses HTML tags in the_excerpt(), e.g. for the &#8220;Continue reading &rarr;&#8221; hyperlink.</p>
<p>I find the following solution more satisfactory and complete:</p>
<p>	if (is_single())	{ echo(strip_tags(get_the_excerpt())); }<br />
	elseif (is_category())	{ echo category_description(); }<br />
	elseif (is_home())	{ bloginfo(&#8216;name&#8217;);bloginfo(&#8216;description&#8217;);}<br />
	else			{ bloginfo(&#8216;name&#8217;);echo(&#8216;&amp;#x2014&#8242;);wp_title(&#8216;|&#8217;,true);}</p>
<p>Note the PHP function, &#8220;strip_tags(get_the_excerpt())&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greten</title>
		<link>http://codegrad.hub.ph/wordpress-meta-description-using-post-excerpt-category-description-and-post-id/#comment-20975</link>
		<dc:creator>Greten</dc:creator>
		<pubDate>Sun, 03 Apr 2011 07:36:18 +0000</pubDate>
		<guid isPermaLink="false">http://codegrad.hub.ph/?p=9#comment-20975</guid>
		<description>Hi Carlo,

I&#039;m not quite sure what you are trying to do here. From what I understand, you use a slightly different code from what I described here and you are trying to use the category description as meta description of static pages and posts. 

If how I understand what you are saying is correct, then that&#039;s not possible. Category description works only on category pages. It does not work in static pages and in posts, even if that post belongs to specific category.</description>
		<content:encoded><![CDATA[<p>Hi Carlo,</p>
<p>I&#8217;m not quite sure what you are trying to do here. From what I understand, you use a slightly different code from what I described here and you are trying to use the category description as meta description of static pages and posts. </p>
<p>If how I understand what you are saying is correct, then that&#8217;s not possible. Category description works only on category pages. It does not work in static pages and in posts, even if that post belongs to specific category.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlo</title>
		<link>http://codegrad.hub.ph/wordpress-meta-description-using-post-excerpt-category-description-and-post-id/#comment-20674</link>
		<dc:creator>Carlo</dc:creator>
		<pubDate>Sat, 05 Mar 2011 16:24:50 +0000</pubDate>
		<guid isPermaLink="false">http://codegrad.hub.ph/?p=9#comment-20674</guid>
		<description>Hi Vicke.
great post.
I implement the code for insert category description only addidng the meta tag:
&lt;meta name=&quot;description&quot; content=&quot;&quot;/&gt;

but now i have not description on post ( and i believe in page too).

So could you suggest me the code to add in the code above to permit that my headspace2 description do its work:-))).

Regards</description>
		<content:encoded><![CDATA[<p>Hi Vicke.<br />
great post.<br />
I implement the code for insert category description only addidng the meta tag:<br />
&lt;meta name=&quot;description&quot; content=&quot;&#8221;/&gt;</p>
<p>but now i have not description on post ( and i believe in page too).</p>
<p>So could you suggest me the code to add in the code above to permit that my headspace2 description do its work:-))).</p>
<p>Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greten</title>
		<link>http://codegrad.hub.ph/wordpress-meta-description-using-post-excerpt-category-description-and-post-id/#comment-20095</link>
		<dc:creator>Greten</dc:creator>
		<pubDate>Thu, 16 Dec 2010 13:45:32 +0000</pubDate>
		<guid isPermaLink="false">http://codegrad.hub.ph/?p=9#comment-20095</guid>
		<description>@Andreas - your welcome!

@Che - As far as I know, WordPress codex operates like a wiki. Most of the information provided there are written by WordPress users who took some time to volunteer writing them. Perhaps, it just happened that none of the volunteer writers encountered this tweak.

@Andrew - Thanks for the information. I will test it sometime later although I don&#039;t use tags that much.</description>
		<content:encoded><![CDATA[<p>@Andreas &#8211; your welcome!</p>
<p>@Che &#8211; As far as I know, WordPress codex operates like a wiki. Most of the information provided there are written by WordPress users who took some time to volunteer writing them. Perhaps, it just happened that none of the volunteer writers encountered this tweak.</p>
<p>@Andrew &#8211; Thanks for the information. I will test it sometime later although I don&#8217;t use tags that much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Che</title>
		<link>http://codegrad.hub.ph/wordpress-meta-description-using-post-excerpt-category-description-and-post-id/#comment-20065</link>
		<dc:creator>Che</dc:creator>
		<pubDate>Sat, 11 Dec 2010 20:41:08 +0000</pubDate>
		<guid isPermaLink="false">http://codegrad.hub.ph/?p=9#comment-20065</guid>
		<description>I&#039;m not sure how did you get it working. It clearly said here 
http://codex.wordpress.org/Function_Reference/the_excerpt

that the_excerpt function only works within the lopp.</description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure how did you get it working. It clearly said here<br />
<a class="outside" href="http://codex.wordpress.org/Function_Reference/the_excerpt" rel="nofollow">http://codex.wordpress.org/Function_Reference/the_excerpt</a></p>
<p>that the_excerpt function only works within the lopp.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://codegrad.hub.ph/wordpress-meta-description-using-post-excerpt-category-description-and-post-id/#comment-20061</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Sat, 11 Dec 2010 18:33:37 +0000</pubDate>
		<guid isPermaLink="false">http://codegrad.hub.ph/?p=9#comment-20061</guid>
		<description>Thanks for the tip. I can add this - Wordpress has tag_description function using which you can use your tag descriptions inside the meta tag. So... You can add another elseif with is_tag();... I&#039;ll try to post an example, dunno if it will be filtered out:

&lt;code&gt;elseif ( is_tag() ) { echo  strip_tags( tag_description() ); }&lt;/code&gt;

strip_tags is needed because by default Wordpress adds p tags around tag_description.</description>
		<content:encoded><![CDATA[<p>Thanks for the tip. I can add this &#8211; WordPress has tag_description function using which you can use your tag descriptions inside the meta tag. So&#8230; You can add another elseif with is_tag();&#8230; I&#8217;ll try to post an example, dunno if it will be filtered out:</p>
<p><code>elseif ( is_tag() ) { echo  strip_tags( tag_description() ); }</code></p>
<p>strip_tags is needed because by default WordPress adds p tags around tag_description.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andreas</title>
		<link>http://codegrad.hub.ph/wordpress-meta-description-using-post-excerpt-category-description-and-post-id/#comment-3815</link>
		<dc:creator>Andreas</dc:creator>
		<pubDate>Sun, 25 Oct 2009 12:29:18 +0000</pubDate>
		<guid isPermaLink="false">http://codegrad.hub.ph/?p=9#comment-3815</guid>
		<description>Thanks very much for this I was looking to update my wordpress to show the excerpt as the description for google to see and this was the perfect solution.</description>
		<content:encoded><![CDATA[<p>Thanks very much for this I was looking to update my wordpress to show the excerpt as the description for google to see and this was the perfect solution.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

