<?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 Title Trimming Tutorial</title> <atom:link href="http://www.smor.tv/tutorials/wordpress-tutorials/wordpress-title-trimming-tutorial/feed/" rel="self" type="application/rss+xml" /><link>http://www.smor.tv/tutorials/wordpress-tutorials/wordpress-title-trimming-tutorial/</link> <description></description> <lastBuildDate>Mon, 06 Feb 2012 16:07:17 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=</generator> <item><title>By: mylife</title><link>http://www.smor.tv/tutorials/wordpress-tutorials/wordpress-title-trimming-tutorial/comment-page-1/#comment-3404</link> <dc:creator>mylife</dc:creator> <pubDate>Mon, 31 Oct 2011 12:52:58 +0000</pubDate> <guid
isPermaLink="false">http://www.smor.tv/?p=1056#comment-3404</guid> <description>hello,
I am making a jobsite and using job roller theme in which I am pulling jobs from RSS feeds, when the jobs get pulled on the wordpress site, with the job title, description and tag. Here job title are long with the job location attached with the title.
Now I have to extract only job location such as ex. &quot;Business Analyst &#8211; Financial Job at Yoh - NY new york&quot;  from the title and make updated in the location field column. every time I have to edit post and cut paste job location such as &quot;NY new york&quot; in location column manually.
I tried trimming the title it works but how can I just extract job address text from title and auto update that in location column. I want this process automated,
please help here
waiting...
Thanks </description> <content:encoded><![CDATA[<p>hello,<br
/> I am making a jobsite and using job roller theme in which I am pulling jobs from RSS feeds, when the jobs get pulled on the wordpress site, with the job title, description and tag. Here job title are long with the job location attached with the title.</p><p>Now I have to extract only job location such as ex. &quot;Business Analyst &ndash; Financial Job at Yoh &#8211; NY new york&quot;  from the title and make updated in the location field column. every time I have to edit post and cut paste job location such as &quot;NY new york&quot; in location column manually.</p><p>I tried trimming the title it works but how can I just extract job address text from title and auto update that in location column. I want this process automated,</p><p>please help here</p><p>waiting&#8230;</p><p>Thanks</p> ]]></content:encoded> </item> <item><title>By: ridiboomidi</title><link>http://www.smor.tv/tutorials/wordpress-tutorials/wordpress-title-trimming-tutorial/comment-page-1/#comment-3364</link> <dc:creator>ridiboomidi</dc:creator> <pubDate>Thu, 24 Feb 2011 12:17:59 +0000</pubDate> <guid
isPermaLink="false">http://www.smor.tv/?p=1056#comment-3364</guid> <description>although i had problem with if ($titleLength &gt; $maxLength) but after changing it to if ($titleLength &gt; $maxLength) it worked greate , some characters during copy/paste changed , people Bcareful for this kind of errors , Tnx dear author :) </description> <content:encoded><![CDATA[<p>although i had problem with if ($titleLength &amp;gt; $maxLength) but after changing it to if ($titleLength &gt; $maxLength) it worked greate , some characters during copy/paste changed , people Bcareful for this kind of errors , Tnx dear author <img
src='http://www.smor.tv/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p> ]]></content:encoded> </item> <item><title>By: Sam Morris</title><link>http://www.smor.tv/tutorials/wordpress-tutorials/wordpress-title-trimming-tutorial/comment-page-1/#comment-3309</link> <dc:creator>Sam Morris</dc:creator> <pubDate>Tue, 21 Sep 2010 06:32:09 +0000</pubDate> <guid
isPermaLink="false">http://www.smor.tv/?p=1056#comment-3309</guid> <description>Hey Josh,
As per your observation I changed the code so it&#039;s formatted correctly (and can be copied without error), thanks for pointing out the issue. I still need to fix up some of my other posts, but this one should be fine. </description> <content:encoded><![CDATA[<p>Hey Josh,</p><p>As per your observation I changed the code so it&#039;s formatted correctly (and can be copied without error), thanks for pointing out the issue. I still need to fix up some of my other posts, but this one should be fine.</p> ]]></content:encoded> </item> <item><title>By: Josh</title><link>http://www.smor.tv/tutorials/wordpress-tutorials/wordpress-title-trimming-tutorial/comment-page-1/#comment-3308</link> <dc:creator>Josh</dc:creator> <pubDate>Tue, 21 Sep 2010 05:47:48 +0000</pubDate> <guid
isPermaLink="false">http://www.smor.tv/?p=1056#comment-3308</guid> <description>ah - I see what I did - funny tho - looks like the code portion of this page has changed since yesterday. </description> <content:encoded><![CDATA[<p>ah &#8211; I see what I did &#8211; funny tho &#8211; looks like the code portion of this page has changed since yesterday.</p> ]]></content:encoded> </item> <item><title>By: Sam Morris</title><link>http://www.smor.tv/tutorials/wordpress-tutorials/wordpress-title-trimming-tutorial/comment-page-1/#comment-3307</link> <dc:creator>Sam Morris</dc:creator> <pubDate>Tue, 21 Sep 2010 02:42:40 +0000</pubDate> <guid
isPermaLink="false">http://www.smor.tv/?p=1056#comment-3307</guid> <description>//
echo $trimmedTitle . &quot;...&quot;;
That part is probably what&#039;s causing the issue. Sorry for the formatting, the plugin I was using for displaying PHP code was causing my formatting to disappear. Try to copy it from above again and it should work for you. </description> <content:encoded><![CDATA[<p>//<br
/> echo $trimmedTitle . &quot;&#8230;&quot;;</p><p>That part is probably what&#039;s causing the issue. Sorry for the formatting, the plugin I was using for displaying PHP code was causing my formatting to disappear. Try to copy it from above again and it should work for you.</p> ]]></content:encoded> </item> <item><title>By: Josh</title><link>http://www.smor.tv/tutorials/wordpress-tutorials/wordpress-title-trimming-tutorial/comment-page-1/#comment-3305</link> <dc:creator>Josh</dc:creator> <pubDate>Mon, 20 Sep 2010 14:24:11 +0000</pubDate> <guid
isPermaLink="false">http://www.smor.tv/?p=1056#comment-3305</guid> <description>my titles are displaying twice?!?
this is the code I copied from above:
// Title Trimmer (Version 3)
// Sam Morris - 12.28.2009
// &lt;a href=&quot;http://www.smor.tv&quot; target=&quot;_blank&quot;&gt;www.smor.tv&lt;/a&gt;
function title_trimmer($title , $maxLength){
$titleLength = strlen($title);
// get the amount of characters in the title
// start conditional
if ($titleLength &gt; $maxLength) {
// if the title length is over the max length, then we start the trimming process.
$trimmedTitle = substr_replace($title,&quot;&quot;,$maxLength); echo $trimmedTitle;
//
echo $trimmedTitle . &quot;...&quot;;
//use this instead of the line above if you prefer having a ... after your trimmed titles.
} else {
echo $title; }}
this is the code in my page:
&lt;?php title_trimmer(get_the_title() , 40); ?&gt;
What am I doing wrong??
great function ;) </description> <content:encoded><![CDATA[<p>my titles are displaying twice?!?</p><p>this is the code I copied from above:</p><p>// Title Trimmer (Version 3)<br
/> // Sam Morris &#8211; 12.28.2009<br
/> // <a
href="http://www.smor.tv" target="_blank">http://www.smor.tv</a><br
/> function title_trimmer($title , $maxLength){<br
/> $titleLength = strlen($title);<br
/> // get the amount of characters in the title<br
/> // start conditional<br
/> if ($titleLength &gt; $maxLength) {<br
/> // if the title length is over the max length, then we start the trimming process.<br
/> $trimmedTitle = substr_replace($title,&quot;&quot;,$maxLength); echo $trimmedTitle;<br
/> //<br
/> echo $trimmedTitle . &quot;&#8230;&quot;;<br
/> //use this instead of the line above if you prefer having a &#8230; after your trimmed titles.<br
/> } else {<br
/> echo $title; }}</p><p>this is the code in my page:</p><p>&lt;?php title_trimmer(get_the_title() , 40); ?&gt;</p><p>What am I doing wrong??</p><p>great function <img
src='http://www.smor.tv/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p> ]]></content:encoded> </item> <item><title>By: Sam Morris</title><link>http://www.smor.tv/tutorials/wordpress-tutorials/wordpress-title-trimming-tutorial/comment-page-1/#comment-3304</link> <dc:creator>Sam Morris</dc:creator> <pubDate>Sat, 11 Sep 2010 01:31:00 +0000</pubDate> <guid
isPermaLink="false">http://www.smor.tv/?p=1056#comment-3304</guid> <description>Hi Nathan,
It depends on what you&#039;re trying to do, but sometimes I need to create a widget to preform some type of standard functionality (like displaying recent posts), but don&#039;t want the titles wrapping to a 2nd line. I typically use the My Custom Widgets plugin  (&lt;a href=&quot;http://wordpress.org/extend/plugins/mycustomwidget/&quot; rel=&quot;nofollow&quot;&gt;http://wordpress.org/extend/plugins/mycustomwidge...&lt;/a&gt;) and create a widget that contains a WordPress loop. Then I can grab the posts I want and have the ability to wrap the title tags in the title trimmer function. The end result would be a loop going through my recent posts with trimmed down titles. </description> <content:encoded><![CDATA[<p>Hi Nathan,</p><p>It depends on what you&#39;re trying to do, but sometimes I need to create a widget to preform some type of standard functionality (like displaying recent posts), but don&#39;t want the titles wrapping to a 2nd line. I typically use the My Custom Widgets plugin  (<a
href="http://wordpress.org/extend/plugins/mycustomwidget/" rel="nofollow">http://wordpress.org/extend/plugins/mycustomwidge&#8230;</a>) and create a widget that contains a WordPress loop. Then I can grab the posts I want and have the ability to wrap the title tags in the title trimmer function. The end result would be a loop going through my recent posts with trimmed down titles.</p> ]]></content:encoded> </item> <item><title>By: Nathan</title><link>http://www.smor.tv/tutorials/wordpress-tutorials/wordpress-title-trimming-tutorial/comment-page-1/#comment-3303</link> <dc:creator>Nathan</dc:creator> <pubDate>Sat, 11 Sep 2010 01:03:39 +0000</pubDate> <guid
isPermaLink="false">http://www.smor.tv/?p=1056#comment-3303</guid> <description>this is perfect!
Can you recommend a way to do this type of thing for only a particular widget? </description> <content:encoded><![CDATA[<p>this is perfect!<br
/> Can you recommend a way to do this type of thing for only a particular widget?</p> ]]></content:encoded> </item> <item><title>By: Sam Morris</title><link>http://www.smor.tv/tutorials/wordpress-tutorials/wordpress-title-trimming-tutorial/comment-page-1/#comment-3296</link> <dc:creator>Sam Morris</dc:creator> <pubDate>Mon, 16 Aug 2010 02:17:04 +0000</pubDate> <guid
isPermaLink="false">http://www.smor.tv/?p=1056#comment-3296</guid> <description>This tutorial just shows the basics, but isn&#039;t perfect for all circumstances (for example, words can be cut in half, etc). I&#039;m sure there&#039;s a ton of plugins that can do this, however I can&#039;t think of any off the top of my head.
Have a look on the wordpress site, &lt;a href=&quot;http://www.wordpress.org/extend/plugins/&quot; rel=&quot;nofollow&quot;&gt; &lt;a href=&quot;http://www.wordpress.org/extend/plugins/&lt;/a&gt;&quot; target=&quot;_blank&quot;&gt;www.wordpress.org/extend/plugins/&lt;/a&gt;&lt;/a&gt; </description> <content:encoded><![CDATA[<p>This tutorial just shows the basics, but isn&#39;t perfect for all circumstances (for example, words can be cut in half, etc). I&#39;m sure there&#39;s a ton of plugins that can do this, however I can&#39;t think of any off the top of my head.</p><p>Have a look on the wordpress site, <a
href="http://www.wordpress.org/extend/plugins/" rel="nofollow"> &lt;a href=&quot;</a><a
href="http://www.wordpress.org/extend/plugins/" rel="nofollow">http://www.wordpress.org/extend/plugins/</a>&#8221; target=&#8221;_blank&#8221;&gt;www.wordpress.org/extend/plugins/</p> ]]></content:encoded> </item> <item><title>By: @marketHEIST</title><link>http://www.smor.tv/tutorials/wordpress-tutorials/wordpress-title-trimming-tutorial/comment-page-1/#comment-3295</link> <dc:creator>@marketHEIST</dc:creator> <pubDate>Mon, 16 Aug 2010 01:51:39 +0000</pubDate> <guid
isPermaLink="false">http://www.smor.tv/?p=1056#comment-3295</guid> <description>thanks for this tutorial.  Was wondering how other sites to this!  ARe there any plugins that do the same thing? </description> <content:encoded><![CDATA[<p>thanks for this tutorial.  Was wondering how other sites to this!  ARe there any plugins that do the same thing?</p> ]]></content:encoded> </item> <item><title>By: PHP Tutorial – Functions &#124; NextDawn Programming Tutorials &#124; PHP WebDev Insider</title><link>http://www.smor.tv/tutorials/wordpress-tutorials/wordpress-title-trimming-tutorial/comment-page-1/#comment-2590</link> <dc:creator>PHP Tutorial – Functions &#124; NextDawn Programming Tutorials &#124; PHP WebDev Insider</dc:creator> <pubDate>Sun, 07 Feb 2010 06:27:37 +0000</pubDate> <guid
isPermaLink="false">http://www.smor.tv/?p=1056#comment-2590</guid> <description>[...] WordPress Title Trimming Tutorial &#124; SMOR.tv : Sam Morris [...]</description> <content:encoded><![CDATA[<p>[...] WordPress Title Trimming Tutorial | SMOR.tv : Sam Morris [...]</p> ]]></content:encoded> </item> </channel> </rss>
