<?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>ThemeShaper Forums Tag: shorten text</title>
<link>http://themeshaper.com/forums/</link>
<description>Help In Shaping WordPress Themes</description>
<language>en</language>
<pubDate>Sat, 25 May 2013 19:06:38 +0000</pubDate>

<item>
<title>helgatheviking on "Add Thumbnail to Shortened Post"</title>
<link>http://themeshaper.com/forums/topic/add-thumbnail-to-shortened-post#post-26158</link>
<pubDate>Wed, 04 Apr 2012 14:28:49 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">26158@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;hello face, meet palm!  it happens...
&#60;/p&#62;</description>
</item>
<item>
<title>bogh on "Add Thumbnail to Shortened Post"</title>
<link>http://themeshaper.com/forums/topic/add-thumbnail-to-shortened-post#post-26155</link>
<pubDate>Wed, 04 Apr 2012 08:43:24 +0000</pubDate>
<dc:creator>bogh</dc:creator>
<guid isPermaLink="false">26155@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Thank you for your reply, you are right, the code is perfect, I just didn't knew that I have to set the image as featured.&#60;br /&#62;
I have lost just a day with that :)) Next time I should pay more attention to simple things, like setting the image as featured.&#60;/p&#62;
&#60;p&#62;Thank you again for your support.&#60;br /&#62;
I wish you a great day!
&#60;/p&#62;</description>
</item>
<item>
<title>helgatheviking on "Add Thumbnail to Shortened Post"</title>
<link>http://themeshaper.com/forums/topic/add-thumbnail-to-shortened-post#post-26151</link>
<pubDate>Wed, 04 Apr 2012 04:14:06 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">26151@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;that all looks good.  props for searching the forum to find the appropriate answers.  &#60;/p&#62;
&#60;p&#62;assuming that you &#60;em&#62;have&#60;/em&#62; selected a featured image, thematic's default mode is to display a thumbnail anywhere there is an excerpt.  &#60;/p&#62;
&#60;p&#62;this behavior can be disabled by targeting the following filter:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;apply_filters( &#38;#39;thematic_post_thumbs&#38;#39;, TRUE)&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;you can see it is TRUE by default.  possible reasons you might not be seeing a thumbnail include filter thematic_post_thumbs to FALSE, not having a featured image set, hiding the featured image with CSS for some reason, or a plugin could be interfering (a bit of a long shot there, but who knows)
&#60;/p&#62;</description>
</item>
<item>
<title>bogh on "Add Thumbnail to Shortened Post"</title>
<link>http://themeshaper.com/forums/topic/add-thumbnail-to-shortened-post#post-26145</link>
<pubDate>Tue, 03 Apr 2012 12:14:23 +0000</pubDate>
<dc:creator>bogh</dc:creator>
<guid isPermaLink="false">26145@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hi, please help me with this one.&#60;/p&#62;
&#60;p&#62;I have found the following code to shorten the excerpts on home page; but if a post has a thumb, the thumb does not show up on home page excerpts.&#60;br /&#62;
Please someone tell me how I can make the thumbs show up on the following code. What code should I add, and where?&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;//Shorten the Posts on Home Page and ADD Read More Link
function childtheme_content($content) {
	if (is_home() &#124;&#124; is_front_page()) {
	$content= &#38;#39;excerpt&#38;#39;;
	}
	return $content;
}
add_filter(&#38;#39;thematic_content&#38;#39;, &#38;#39;childtheme_content&#38;#39;);

function excerpt_ellipse($text) {
	return str_replace(&#38;#39;[...]&#38;#39;, &#38;#39;
	&#38;lt;a href=&#38;quot;&#38;#39;.get_permalink().&#38;#39;&#38;quot;&#38;gt;Read more&#38;lt;/a&#38;gt;&#38;#39;, $text);
}
add_filter(&#38;#39;get_the_excerpt&#38;#39;, &#38;#39;excerpt_ellipse&#38;#39;);

function new_excerpt_length($length) {
	return 20;
}
add_filter(&#38;#39;excerpt_length&#38;#39;, &#38;#39;new_excerpt_length&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Thank you a lot.
&#60;/p&#62;</description>
</item>
<item>
<title>bogh on "Shorten Post Title"</title>
<link>http://themeshaper.com/forums/topic/shorten-post-title#post-25902</link>
<pubDate>Wed, 14 Mar 2012 09:50:07 +0000</pubDate>
<dc:creator>bogh</dc:creator>
<guid isPermaLink="false">25902@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Thank you,&#60;/p&#62;
&#60;p&#62;I have override the thematic_postheader_posttitle() with childtheme_override_postheader_posttitle() and it worked.&#60;/p&#62;
&#60;p&#62;So in case someone needs that I have added the code below.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;//Shorten Post Titles on Home Page
function ShortenPostTitle($text) { // Function name ShortenText
	$chars_limit = 50; // Character length
	$chars_text = strlen($text);
	$text = $text.&#38;quot; &#38;quot;;
	$text = substr($text,0,$chars_limit);
	$text = substr($text,0,strrpos($text,&#38;#39; &#38;#39;));

	if ($chars_text &#38;gt; $chars_limit)
	   { $text = $text.&#38;quot;...&#38;quot;; } // Ellipsis
	   return $text;
}

function childtheme_override_postheader_posttitle() {

	if (is_single() &#124;&#124; is_page(home)) {
		$posttitle = &#38;#39;&#38;lt;h1 class=&#38;quot;entry-title&#38;quot;&#38;gt;&#38;#39; . get_the_title() . &#38;quot;&#38;lt;/h1&#38;gt;\n&#38;quot;;
	} elseif (is_404()) {
		$posttitle = &#38;#39;&#38;lt;h1 class=&#38;quot;entry-title&#38;quot;&#38;gt;&#38;#39; . __(&#38;#39;Not Found&#38;#39;, &#38;#39;thematic&#38;#39;) . &#38;quot;&#38;lt;/h1&#38;gt;\n&#38;quot;;
	} else {
		$posttitle = &#38;#39;&#38;lt;h2 class=&#38;quot;entry-title&#38;quot;&#38;gt;&#38;lt;a href=&#38;quot;&#38;#39;;
		$posttitle .= apply_filters(&#38;#39;the_permalink&#38;#39;, get_permalink());
		$posttitle .= &#38;#39;&#38;quot; title=&#38;quot;&#38;#39;;
		$posttitle .= __(&#38;#39;Permalink to &#38;#39;, &#38;#39;thematic&#38;#39;) . the_title_attribute(&#38;#39;echo=0&#38;#39;);
		$posttitle .= &#38;#39;&#38;quot; rel=&#38;quot;bookmark&#38;quot;&#38;gt;&#38;#39;;
		$posttitle .= ShortenPostTitle(get_the_title());
		$posttitle .= &#38;quot;&#38;lt;/a&#38;gt;&#38;lt;/h2&#38;gt;\n&#38;quot;;
	}
	return apply_filters(&#38;#39;childtheme_override_postheader_posttitle&#38;#39;,$posttitle);
}&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>helgatheviking on "Shorten Post Title"</title>
<link>http://themeshaper.com/forums/topic/shorten-post-title#post-25893</link>
<pubDate>Tue, 13 Mar 2012 16:11:01 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">25893@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;either override or filter thematic_postheader_posttitle()
&#60;/p&#62;</description>
</item>
<item>
<title>bogh on "Shorten Post Title"</title>
<link>http://themeshaper.com/forums/topic/shorten-post-title#post-25888</link>
<pubDate>Tue, 13 Mar 2012 08:55:22 +0000</pubDate>
<dc:creator>bogh</dc:creator>
<guid isPermaLink="false">25888@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hi, &#60;/p&#62;
&#60;p&#62;I need to shorten the post titles on home page. Is there an easy way to do it in a Thematic Child Theme?&#60;/p&#62;
&#60;p&#62;I have found this tutorial: &#60;a href=&#34;http://www.doc4design.com/articles/wordpress-5ways-shorten-titles/&#34; rel=&#34;nofollow&#34;&#62;http://www.doc4design.com/articles/wordpress-5ways-shorten-titles/&#60;/a&#62;&#60;br /&#62;
but I don't know how to use it in Thematic Child Themes.&#60;/p&#62;
&#60;p&#62;Thank you!
&#60;/p&#62;</description>
</item>

</channel>
</rss>
