<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>WordPress &#8250; Support Topic: get_the_excerpt - Outside the Loop</title>
<link>http://wordpress.org/support/</link>
<description>WordPress &#8250; Support Topic: get_the_excerpt - Outside the Loop</description>
<language>en</language>
<pubDate>Thu, 26 Nov 2009 15:50:41 +0000</pubDate>

<item>
<title>wpsec on "get_the_excerpt - Outside the Loop"</title>
<link>http://wordpress.org/support/topic/222916#post-970606</link>
<pubDate>Fri, 30 Jan 2009 01:18:23 +0000</pubDate>
<dc:creator>wpsec</dc:creator>
<guid isPermaLink="false">970606@http://wordpress.org/support/</guid>
<description>&#60;p&#62;maybe include something like &#60;/p&#62;
&#60;p&#62;&#60;code&#62;var_dump($post);&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;after you is_single() line to make sure that the $post object is actually loaded with data. If you get a NULL result then obviously it isn't. And if it is loaded then you'll see an ID element.
&#60;/p&#62;</description>
</item>
<item>
<title>vanishdesign on "get_the_excerpt - Outside the Loop"</title>
<link>http://wordpress.org/support/topic/222916#post-970577</link>
<pubDate>Fri, 30 Jan 2009 00:54:30 +0000</pubDate>
<dc:creator>vanishdesign</dc:creator>
<guid isPermaLink="false">970577@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Hopefully this helps:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.michelem.org/2008/07/11/wordpress-dynamic-meta-description-and-keywords-howto/&#34;&#62;http://www.michelem.org/2008/07/11/wordpress-dynamic-meta-description-and-keywords-howto/&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>timjamz on "get_the_excerpt - Outside the Loop"</title>
<link>http://wordpress.org/support/topic/222916#post-916543</link>
<pubDate>Sat, 06 Dec 2008 20:15:04 +0000</pubDate>
<dc:creator>timjamz</dc:creator>
<guid isPermaLink="false">916543@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Just a side note... even upgrading to 2.6.5, I get the same result outside the loop by making $post global.  In ver.2.5.1 I am able to echo get_the_tags, get_the_excerpt, and even get_the_category.  In version 2.6+, get_the_tags works just fine, but get_the_excerpt, and even get_the_category isn't working.&#60;/p&#62;
&#60;p&#62;I'm stumped.
&#60;/p&#62;</description>
</item>
<item>
<title>timjamz on "get_the_excerpt - Outside the Loop"</title>
<link>http://wordpress.org/support/topic/222916#post-916485</link>
<pubDate>Sat, 06 Dec 2008 17:57:10 +0000</pubDate>
<dc:creator>timjamz</dc:creator>
<guid isPermaLink="false">916485@http://wordpress.org/support/</guid>
<description>&#60;p&#62;I'm trying to figure out why get_the_excerpt is delivering nothing except a line break in WP2.6. I'm echoing tags and the excerpt for meta keywords and description in my header file. I do this by setting $post as global in the header, if it's a single post, then echoing tags through a foreach, then the excerpt via get_the_excerpt.&#60;/p&#62;
&#60;p&#62;This works without problem in another blog I have, which is WP2.5.1.  On the WP2.6 blog I'm having trouble with, echoing the tags works fine but get_the_excerpt results in only a line break. Edit: In both cases, I am not specifying an excerpt, but relying on the default 55-word filter inherent to WP.&#60;/p&#62;
&#60;p&#62;Was get_the_excerpt changed between 2.5.1 and 2.6? Am I missing something brilliantly simple?&#60;/p&#62;
&#60;p&#62;Here's my code, outside the loop, in header.php:&#60;/p&#62;
&#60;p&#62;To echo the excerpt:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php global $post;
   if (is_single()) {
      echo strip_tags(get_the_excerpt($post-&#38;gt;ID));
   } ?&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;To echo the tags ($post is already global):&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
   if (is_single()) {
      foreach(get_the_tags($post-&#38;gt;ID) as $tag) { echo $tag-&#38;gt;name . &#38;#39;, &#38;#39;; }
   } ?&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I hope this makes sense, and I appreciate any help! Thanks!
&#60;/p&#62;</description>
</item>

</channel>
</rss>
