<?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>i shine light &#187; Uncategorized</title>
	<atom:link href="http://www.ishinelight.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ishinelight.com</link>
	<description>in a digital world</description>
	<lastBuildDate>Mon, 21 Sep 2009 03:29:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP snippet for WordPress</title>
		<link>http://www.ishinelight.com/2009/03/php-snippet-for-wordpress/</link>
		<comments>http://www.ishinelight.com/2009/03/php-snippet-for-wordpress/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 19:05:52 +0000</pubDate>
		<dc:creator>Aaron Reimann</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.ishinelight.com/?p=91</guid>
		<description><![CDATA[So I decided to build my own WordPress theme from scratch.  I know, it seems like that is all I&#8217;m posting about, but that is what I am wanting to learn right now&#8230;and I try to post what I am learning.  Here is one of the most recent things I have done.
Most WordPress sites out [...]]]></description>
			<content:encoded><![CDATA[<p>So I decided to build my own WordPress theme from scratch.  I know, it seems like that is all I&#8217;m posting about, but that is what I am wanting to learn right now&#8230;and I try to post what I am learning.  Here is one of the most recent things I have done.</p>
<p>Most WordPress sites out there have 10 posts on the home page, and it is the whole post.  It can make for a very long page.  I prefer to have a lot of the most recent page on the home page, and then excerpts of the other recent ones.  The function &#8220;the_excerpt()&#8221; does not let you specify the amount of characters, so I either had the whole post, or just a little.</p>
<p>On this site I limit the amount of characters to 6,000 by using a function (not in WP by default, if you need it, let me know via email) called &#8220;the_content_limit()&#8221;.  I thought that was a great thing, but it stripped all of the html.  I wanted to keep my breaks, so I wrote this:</p>
<pre>	$content = strip_tags($content, '&lt;p&gt;&lt;br&gt;&lt;br /&gt;');
	$content6 = substr($content, -6); // grab last 6 chars
	$last6array = str_split($content6); // split the 6 in an array
	if (in_array("&lt;", $last6array)) {
		$content = substr($content, 0, -6);
	}</pre>
<p>The code just checks to see if the last 6 characters have a &lt; and if so, strip it.  We want to make sure that all tags are closed. </p>
&nbsp; ]]></content:encoded>
			<wfw:commentRss>http://www.ishinelight.com/2009/03/php-snippet-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
