<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>bavotasan.com &#187; length</title>
	<atom:link href="http://bavotasan.com/tag/length/feed/" rel="self" type="application/rss+xml" />
	<link>http://bavotasan.com</link>
	<description>by c.bavota</description>
	<lastBuildDate>Tue, 07 Feb 2012 15:42:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Shorten Your Post Titles in WordPress</title>
		<link>http://bavotasan.com/2010/shorten-your-post-titles-in-wordpress/</link>
		<comments>http://bavotasan.com/2010/shorten-your-post-titles-in-wordpress/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 15:24:22 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Array]]></category>
		<category><![CDATA[count]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[Function]]></category>
		<category><![CDATA[idea]]></category>
		<category><![CDATA[length]]></category>
		<category><![CDATA[line]]></category>
		<category><![CDATA[loop]]></category>
		<category><![CDATA[magazine]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[php tags]]></category>
		<category><![CDATA[pop]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[reason]]></category>
		<category><![CDATA[Slideshow]]></category>
		<category><![CDATA[title]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=2542</guid>
		<description><![CDATA[This is not a function that you would need to use often, but I came across a reason to use it recently and I thought it might be a good idea to share it. All it does is limit the number of words in your title, just in case you don&#8217;t want it to wrap [...]]]></description>
			<content:encoded><![CDATA[<p>This is not a function that you would need to use often, but I came across a reason to use it recently and I thought it might be a good idea to share it. All it does is limit the number of words in your title, just in case you don&#8217;t want it to wrap onto a second line. I used it in the featured slideshow on <a href="http://themes.bavotasan.com/our-themes/premium-themes/magazine-premium/">Magazine Premium</a> since the size of the boxes is fixed.</p>
<p>Include this in your <code>functions.php</code> file between the PHP tags:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> short_title<span style="color: #009900;">&#40;</span><span style="color: #000088;">$after</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$length</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$mytitle</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">' '</span><span style="color: #339933;">,</span> get_the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$length</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mytitle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&gt;=</span><span style="color: #000088;">$length</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #990000;">array_pop</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mytitle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$mytitle</span> <span style="color: #339933;">=</span> <span style="color: #990000;">implode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$mytitle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span> <span style="color: #000088;">$after</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$mytitle</span> <span style="color: #339933;">=</span> <span style="color: #990000;">implode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$mytitle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$mytitle</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></td></tr></table></div>

<p>Then you can use it within the WordPress loop like this:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> short_title<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'...'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">8</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></td></tr></table></div>

<p>If you would rather count by characters instead of just words, you can add this function to your <code>functions.php</code> file instead of the one above:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> short_title<span style="color: #009900;">&#40;</span><span style="color: #000088;">$after</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">,</span> <span style="color: #000088;">$length</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$mytitle</span> <span style="color: #339933;">=</span> get_the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$size</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mytitle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$size</span><span style="color: #339933;">&gt;</span><span style="color: #000088;">$length</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$mytitle</span> <span style="color: #339933;">=</span> <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mytitle</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #000088;">$length</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$mytitle</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">' '</span><span style="color: #339933;">,</span><span style="color: #000088;">$mytitle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">array_pop</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mytitle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$mytitle</span> <span style="color: #339933;">=</span> <span style="color: #990000;">implode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$mytitle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #000088;">$after</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$mytitle</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/2010/shorten-your-post-titles-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Quick Function to Shorten the Post Title in WordPress</title>
		<link>http://bavotasan.com/2010/quick-function-shorten-post-title-wordpress/</link>
		<comments>http://bavotasan.com/2010/quick-function-shorten-post-title-wordpress/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 20:46:16 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Array]]></category>
		<category><![CDATA[count]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[Function]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[length]]></category>
		<category><![CDATA[need]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[piece]]></category>
		<category><![CDATA[pop]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[reason]]></category>
		<category><![CDATA[return]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=1881</guid>
		<description><![CDATA[For some reason, a lot of people seem to be using extremely long post titles. I am a firm believer in making a title as precise as possible to make it easier on people who are trying to actually find your article. Sure, I guess you can throw in as many keywords as you want [...]]]></description>
			<content:encoded><![CDATA[<p>For some reason, a lot of people seem to be using extremely long post titles. I am a firm believer in making a title as precise as possible to make it easier on people who are trying to actually find your article. Sure, I guess you can throw in as many keywords as you want in hopes that you might get more from Google, but I doubt that will really do anything for your site&#8217;s SEO.<br />
<span id="more-1881"></span><br />
In case you are one of those people who feel the need for extremely long post titles and you want to display them in places where they might not fit, here is a quick piece of code that you can add to your <code>functions.php</code> file.</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> short_title<span style="color: #009900;">&#40;</span><span style="color: #000088;">$after</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$length</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$mytitle</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">' '</span><span style="color: #339933;">,</span> get_the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$length</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mytitle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&gt;=</span><span style="color: #000088;">$length</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #990000;">array_pop</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mytitle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$mytitle</span> <span style="color: #339933;">=</span> <span style="color: #990000;">implode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$mytitle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span> <span style="color: #000088;">$after</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$mytitle</span> <span style="color: #339933;">=</span> <span style="color: #990000;">implode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$mytitle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$mytitle</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></td></tr></table></div>

<p>You can call the function like so:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
<span style="color: #666666; font-style: italic;">// short_title($after, $length)</span>
<span style="color: #b1b100;">echo</span> short_title<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'...'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></td></tr></table></div>

<p>The above code will truncate your title at 10 words and add a trailing ellipsis.</p>
]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/2010/quick-function-shorten-post-title-wordpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Creating Shadows with CSS3</title>
		<link>http://bavotasan.com/2010/creating-shadows-css3/</link>
		<comments>http://bavotasan.com/2010/creating-shadows-css3/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 19:33:36 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[alpha]]></category>
		<category><![CDATA[amount]]></category>
		<category><![CDATA[background color]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Creating]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[horizontal]]></category>
		<category><![CDATA[inset]]></category>
		<category><![CDATA[length]]></category>
		<category><![CDATA[name]]></category>
		<category><![CDATA[opacity]]></category>
		<category><![CDATA[reason]]></category>
		<category><![CDATA[rgba]]></category>
		<category><![CDATA[Space]]></category>
		<category><![CDATA[Style]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=1773</guid>
		<description><![CDATA[CSS3 has introduced some cool effects that give you control over elements of design that were once only possible using images. One of the new effects I have been having a lot of fun with lately is the box shadow. Many, if not all, of the new CSS3 effects only work on Safari 4, Firefox [...]]]></description>
			<content:encoded><![CDATA[<p>CSS3 has introduced some cool effects that give you control over elements of design that were once only possible using images. One of the new effects I have been having a lot of fun with lately is the box shadow. Many, if not all, of the new CSS3 effects only work on Safari 4, Firefox 3.5 and Google Chrome. Just one more reason to make sure to use one of those browsers.<br />
<span id="more-1773"></span><br />
It is easy to create a shadow effect with CSS3 by using the <code>box-shadow</code> style. There are six variables which the style accepts.</p>
<p><strong>Inset</strong><br />
Creates a shadow on the inside of the element instead of on the outside.</p>
<p><strong>Horizontal length</strong><br />
The amount of positive or negative space on the X axis between the shadow and the main element.</p>
<p><strong>Vertical length</strong><br />
The amount of positive or negative space on the Y axis between the shadow and the main element.</p>
<p><strong>Blur radius</strong><br />
The amount of blur on the shadow. Minimum of zero.</p>
<p><strong>Spread radius</strong><br />
The amount of spread defines a larger or smaller shadow. </p>
<p><strong>Color</strong><br />
The color of the shadow.</p>
<p><em>Basic example</em>:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="css" style="font-family:monospace;">box-shadow<span style="color: #00AA00;">:</span> <span style="color: #933;">6px</span> <span style="color: #933;">6px</span> <span style="color: #933;">12px</span> <span style="color: #cc00cc;">#000000</span><span style="color: #00AA00;">;</span>
-webkit-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #933;">6px</span> <span style="color: #933;">6px</span> <span style="color: #933;">12px</span> <span style="color: #cc00cc;">#000000</span><span style="color: #00AA00;">;</span>
-moz-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #933;">6px</span> <span style="color: #933;">6px</span> <span style="color: #933;">12px</span> <span style="color: #cc00cc;">#000000</span><span style="color: #00AA00;">;</span></pre></div></td></tr></table></div>

<p><em>Demo</em>:</p>
<p class="shadow">This is an example of the new box shadow style in CSS3. </p>
<p>&nbsp;</p>
<p>The color variable accepts a hex code (#000000), name (black) or rgb code(0,0,0). It also accepts <em>rgba</em>, which allows for an alpha channel. Using <em>rgba</em> gives you the ability to add opacity to your shadow to soften it and let the background color through.</p>
<p><em>Example with alpha transparency</em>:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="css" style="font-family:monospace;">box-shadow<span style="color: #00AA00;">:</span> <span style="color: #933;">-10px</span> <span style="color: #933;">10px</span> <span style="color: #933;">20px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> .5<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
-webkit-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #933;">-10px</span> <span style="color: #933;">10px</span> <span style="color: #933;">20px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> .5<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
-moz-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #933;">-10px</span> <span style="color: #933;">10px</span> <span style="color: #933;">20px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> .5<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span></pre></div></td></tr></table></div>

<p><em>Demo</em>:</p>
<div class="alphashadow">
<p class="alphashadow">This is an example of the new box shadow style in CSS3 using <em>rgba</em> for the color variable. </p>
</div>
<p>&nbsp;<br />
Creating an inner shadow requires the inset variable.</p>
<p><em>Inset example</em>:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="css" style="font-family:monospace;">box-shadow<span style="color: #00AA00;">:</span> <span style="color: #993333;">inset</span> <span style="color: #933;">1px</span> <span style="color: #933;">1px</span> <span style="color: #933;">10px</span> <span style="color: #cc00cc;">#111111</span><span style="color: #00AA00;">;</span>
-webkit-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #993333;">inset</span> <span style="color: #933;">1px</span> <span style="color: #933;">1px</span> <span style="color: #933;">10px</span> <span style="color: #cc00cc;">#111111</span><span style="color: #00AA00;">;</span>
-moz-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #993333;">inset</span> <span style="color: #933;">1px</span> <span style="color: #933;">1px</span> <span style="color: #933;">10px</span> <span style="color: #cc00cc;">#111111</span><span style="color: #00AA00;">;</span></pre></div></td></tr></table></div>

<p><em>Demo</em>:</p>
<p class="insetshadow">This is an example of the new box shadow style in CSS3 using the <em>inset</em> variable. </p>
<p>&nbsp;<br />
You can easily set whether you want the shadow to larger or smaller that your main element by adding an amount to the spread variable.</p>
<p><em>Spread example</em>:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="css" style="font-family:monospace;">box-shadow<span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">16px</span> <span style="color: #933;">10px</span> <span style="color: #933;">-10px</span> <span style="color: #cc00cc;">#444444</span><span style="color: #00AA00;">;</span>
-webkit-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">16px</span> <span style="color: #933;">10px</span> <span style="color: #933;">-10px</span> <span style="color: #cc00cc;">#444444</span><span style="color: #00AA00;">;</span>
-moz-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">16px</span> <span style="color: #933;">10px</span> <span style="color: #933;">-10px</span> <span style="color: #cc00cc;">#444444</span><span style="color: #00AA00;">;</span></pre></div></td></tr></table></div>

<p><em>Demo</em>:</p>
<p class="spreadshadow">This is an example of the new box shadow style in CSS3 using a <em>spread</em> amount. </p>
<p>&nbsp;<br />
There are tons of possibilities and if you really want to go crazy you can define multiple shadows. Just separate them all by commas.</p>
<p><em>Multiple shadows example</em>:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="css" style="font-family:monospace;">box-shadow<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">20px</span> <span style="color: #cc00cc;">#e15f5f</span><span style="color: #00AA00;">,</span> <span style="color: #933;">10px</span> <span style="color: #933;">12px</span> <span style="color: #933;">20px</span> <span style="color: #cc00cc;">#5fb3e1</span><span style="color: #00AA00;">,</span> <span style="color: #933;">-10px</span> <span style="color: #933;">12px</span> <span style="color: #933;">20px</span> <span style="color: #cc00cc;">#5fe168</span><span style="color: #00AA00;">,</span> <span style="color: #933;">-10px</span> <span style="color: #933;">-12px</span> <span style="color: #933;">20px</span> <span style="color: #cc00cc;">#e1dc5f</span><span style="color: #00AA00;">,</span> <span style="color: #933;">10px</span> <span style="color: #933;">-12px</span> <span style="color: #933;">20px</span> <span style="color: #cc00cc;">#e15fcd</span><span style="color: #00AA00;">;</span>
-webkit-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">20px</span> <span style="color: #cc00cc;">#e15f5f</span><span style="color: #00AA00;">,</span> <span style="color: #933;">10px</span> <span style="color: #933;">12px</span> <span style="color: #933;">20px</span> <span style="color: #cc00cc;">#5fb3e1</span><span style="color: #00AA00;">,</span> <span style="color: #933;">-10px</span> <span style="color: #933;">12px</span> <span style="color: #933;">20px</span> <span style="color: #cc00cc;">#5fe168</span><span style="color: #00AA00;">,</span> <span style="color: #933;">-10px</span> <span style="color: #933;">-12px</span> <span style="color: #933;">20px</span> <span style="color: #cc00cc;">#e1dc5f</span><span style="color: #00AA00;">,</span> <span style="color: #933;">10px</span> <span style="color: #933;">-12px</span> <span style="color: #933;">20px</span> <span style="color: #cc00cc;">#e15fcd</span><span style="color: #00AA00;">;</span>
-moz-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">20px</span> <span style="color: #cc00cc;">#e15f5f</span><span style="color: #00AA00;">,</span> <span style="color: #933;">10px</span> <span style="color: #933;">12px</span> <span style="color: #933;">20px</span> <span style="color: #cc00cc;">#5fb3e1</span><span style="color: #00AA00;">,</span> <span style="color: #933;">-10px</span> <span style="color: #933;">12px</span> <span style="color: #933;">20px</span> <span style="color: #cc00cc;">#5fe168</span><span style="color: #00AA00;">,</span> <span style="color: #933;">-10px</span> <span style="color: #933;">-12px</span> <span style="color: #933;">20px</span> <span style="color: #cc00cc;">#e1dc5f</span><span style="color: #00AA00;">,</span> <span style="color: #933;">10px</span> <span style="color: #933;">-12px</span> <span style="color: #933;">20px</span> <span style="color: #cc00cc;">#e15fcd</span><span style="color: #00AA00;">;</span></pre></div></td></tr></table></div>

<p><em>Demo</em>:</p>
<p class="multishadow">This is an example of the new box shadow style in CSS3 with multiple shadows defined. </p>
]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/2010/creating-shadows-css3/feed/</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
		<item>
		<title>Quick &amp; Easy Excerpt Mods Coming in WordPress 2.9</title>
		<link>http://bavotasan.com/2009/quick-easy-excerpt-mods-coming-in-wordpress-2-9/</link>
		<comments>http://bavotasan.com/2009/quick-easy-excerpt-mods-coming-in-wordpress-2-9/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 15:14:55 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Change]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[default]]></category>
		<category><![CDATA[end]]></category>
		<category><![CDATA[excerpt]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[Function]]></category>
		<category><![CDATA[length]]></category>
		<category><![CDATA[mods]]></category>
		<category><![CDATA[number]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[piece]]></category>
		<category><![CDATA[power]]></category>
		<category><![CDATA[return]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[the_excerpt]]></category>
		<category><![CDATA[version]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=1393</guid>
		<description><![CDATA[I just stumbled across these two little pieces of code and thought that they might be useful to some people out there who want to mess around with the default settings for the_excerpt() function in WordPress. The first one gives you the power to change the number of words displayed by the function the_excerpt(), and [...]]]></description>
			<content:encoded><![CDATA[<p>I just stumbled across these two little pieces of code and thought that they might be useful to some people out there who want to mess around with the default settings for <code>the_excerpt()</code> function in WordPress. The first one gives you the power to change the number of words displayed by the function <code>the_excerpt()</code>, and yes, you can have more than 55 words. The second piece of code allows you to change the trailing [...] that appears at the end of your excerpt.<br />
<span id="more-1393"></span><br />
Both features are set to be added to version 2.9 of WordPress, but the first currently works in version 2.8.5. Just add these to your theme&#8217;s functions.php file.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> new_excerpt_length<span style="color: #009900;">&#40;</span><span style="color: #000088;">$length</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #cc66cc;">20</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'excerpt_length'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'new_excerpt_length'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Change the number &#8220;20&#8243; to whatever number you want.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> new_excerpt_more<span style="color: #009900;">&#40;</span><span style="color: #000088;">$more</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">'[.....]'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'excerpt_more'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'new_excerpt_more'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Change &#8220;[.....]&#8221; to whatever you want.</p>
]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/2009/quick-easy-excerpt-mods-coming-in-wordpress-2-9/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>

