<?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>cssOrigins.com &#187; Hacks</title>
	<atom:link href="http://www.cssOrigins.com/tag/hacks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cssOrigins.com</link>
	<description>Css Origins, Design Blog and Wordpress Publishing Platform</description>
	<lastBuildDate>Mon, 12 Jul 2010 06:35:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Creating Custom Write Panels in WP</title>
		<link>http://www.cssOrigins.com/2009/creating-custom-write-panels-in-wp/</link>
		<comments>http://www.cssOrigins.com/2009/creating-custom-write-panels-in-wp/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 07:07:33 +0000</pubDate>
		<dc:creator>Hunter Brelsford</dc:creator>
				<category><![CDATA[Archive]]></category>
		<category><![CDATA[News Press]]></category>
		<category><![CDATA[Recently Read]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Custom Fields]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.cssOrigins.com/?p=405</guid>
		<description><![CDATA[Just finished a pretty good article written at wefunction.com, the purpose was to teach the WP community how to creatively add functionality to their website/blog by using custom panels in the add posts/page area. Check the tutorial out. Related posts:Wonderful Information on Web Fonts Recently read a wonderful article about how you can add... Sempo.org [...]


Related posts:<ol><li><a href='http://www.cssOrigins.com/2009/wonderful-information-on-web-fonts/' rel='bookmark' title='Permanent Link: Wonderful Information on Web Fonts'>Wonderful Information on Web Fonts</a> <small>Recently read a wonderful article about how you can add...</small></li>
<li><a href='http://www.cssOrigins.com/2009/sempoorg-sem-institute/' rel='bookmark' title='Permanent Link: Sempo.org SEM institute'>Sempo.org SEM institute</a> <small>I was linked to this website by a friend, it...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Just finished a pretty good article written at wefunction.com, the purpose was to teach the WP community how to creatively add functionality to their website/blog by using custom panels in the add posts/page area.</p>
<p><a href="http://wefunction.com/2008/10/tutorial-creating-custom-write-panels-in-wordpress/">Check the tutorial out.</a></p>


<p>Related posts:<ol><li><a href='http://www.cssOrigins.com/2009/wonderful-information-on-web-fonts/' rel='bookmark' title='Permanent Link: Wonderful Information on Web Fonts'>Wonderful Information on Web Fonts</a> <small>Recently read a wonderful article about how you can add...</small></li>
<li><a href='http://www.cssOrigins.com/2009/sempoorg-sem-institute/' rel='bookmark' title='Permanent Link: Sempo.org SEM institute'>Sempo.org SEM institute</a> <small>I was linked to this website by a friend, it...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.cssOrigins.com/2009/creating-custom-write-panels-in-wp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automatically Retrieve The First Image From Posts On Your Home Page</title>
		<link>http://www.cssOrigins.com/2009/retrieve-first-homepage/</link>
		<comments>http://www.cssOrigins.com/2009/retrieve-first-homepage/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 06:21:56 +0000</pubDate>
		<dc:creator>Hunter Brelsford</dc:creator>
				<category><![CDATA[Archive]]></category>
		<category><![CDATA[News Press]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Custom Fields]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Techniques]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Website]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.cssOrigins.com/?p=249</guid>
		<description><![CDATA[I found this particularly interesting, because I use a similar method to list images on the home page of my site as well. over the weekend if time allows I&#8217;ll be reviewing and adjusting my code. Hopefully this method will allow me to more easily display my post pictures where I need them. Thank you [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>I found this particularly interesting, because I use a similar method to list images on the home page of my site as well. over the weekend if time allows I&#8217;ll be reviewing and adjusting my code. Hopefully this method will allow me to more easily display my post pictures where I need them. Thank you <a href="http://www.smashingmagazine.com/2009/04/15/10-exceptional-wordpress-hacks/" target="_blank" title="Smashing magazine">Smashing Magazine</a> for posting.<span id="more-249"></span></p>
<p><img src="http://www.cssOrigins.com/wp-content/uploads/2009/04/sm5.jpg" /><br />
Automatically Retrieve The First Image From Posts On Your Home Page</p>
<p><strong>The problem</strong> . Many WordPress users use custom fields to display a thumbnail on their blog home page. Of course, this is a nice solution, but how about automatically retrieving the first image from a post and using it as a thumbnail?</p>
<p><strong>The solution</strong> . This hack is quite easy to implement:</p>
<ol>
<li>Open the functions.php file in your theme.</li>
<li>Paste this code in. Don’t forget to specify a default image on line 10 in case a post of yours does not have an image.function catch_that_image {<br />
global $post, $posts;<br />
$first_img = &#8221;;<br />
ob_start;<br />
ob_end_clean;<br />
$output = preg_match_all&#8217;//i&#8217;, $post-&gt;post_content, $matches;<br />
$first_img = $matches [1] [0];<br />
ifempty$first_img{ //Defines a default image<br />
$first_img = &quot;/images/default.jpg&quot;;<br />
}<br />
return $first_img;</li>
<li>Save the functions.php file.</li>
<li>On your blog home page index.php, call the function this way to get the URL of the first image from the post:</li>
</ol>
<p><span><span>&lt;?php </span> <span class="func">echo</span> <span> catch_that_image() ?&gt;</span> </span></p>
<p><strong>Code explanation</strong> . The function uses the global variable $post to parse the post’s content with a regular expression. If an image is found, its URL is returned by the function. If not, the default image URL is returned.</p>
<p>via <a href="http://www.smashingmagazine.com/2009/04/15/10-exceptional-wordpress-hacks/">10 Exceptional WordPress Hacks | Developer&#8217;s Toolbox | Smashing Magazine</a> .</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.cssOrigins.com/2009/retrieve-first-homepage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
