If you have an attachement at the begin of the featured article, like here http://rifmamira.com/2009/07/borsh-2009 ... hastnikov/, the source code looks like
- Code: Select all
[caption id="attachment_1383" align="alignleft" width="300" caption="Рисунок: Юлькин"]<a href="http://rifmamira.com/wp-content/uploads/2009/07/borsh-nam-eto-nravitsya.png"><img class="size-medium wp-image-1383" title="Борщ — нам это нравится" src="http://rifmamira.com/wp-content/uploads/2009/07/borsh-nam-eto-nravitsya-300x150.png" alt="Борщ — нам это нравится. Рисунок: Юлькин" width="300" height="150" /></a>[/caption]
The problem is the function "the_content_rss()" from gallery.php parses it to
- Code: Select all
[caption id="attachment_1383" align="alignleft" width="300" caption="Рисунок: Юлькин"][/caption]
and this code appears in the description on the FCG. This is very bad.
Fast solution
Replace "the_content_rss()" with "the_excerpt()" or "the_content()". I works, but you have no control over the length. For me it doesn't hurt, I only miss the "[...]" at the end.
Best solution
Replace "the_content_rss()" with something like "the_content_limit()" based on "the_content()". This is much more comfortable to use, because you specify the length in chars and not words. Here comes the snippet from "the_content_limit()"
- Code: Select all
<?php function the_content_limit($max_char, $more_link_text = '(more...)', $stripteaser = 0, $more_file = '') {
$content = get_the_content($more_link_text, $stripteaser, $more_file);
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
$content = strip_tags($content);
...
?>









