<?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>Chad Von Lind &#187; Website Designer, WordPress Programmer &amp; Theme Developer &#8211; Chad Von Lind</title>
	<atom:link href="http://vonlind.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://vonlind.com</link>
	<description>Web Design Specialist, WordPress, CMS and eCommerce</description>
	<lastBuildDate>Mon, 17 Oct 2011 18:27:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Muzzleloading &amp; Pioneer Gear</title>
		<link>http://vonlind.com/2011/09/muzzleloading-pioneer-gear/</link>
		<comments>http://vonlind.com/2011/09/muzzleloading-pioneer-gear/#comments</comments>
		<pubDate>Thu, 22 Sep 2011 21:51:04 +0000</pubDate>
		<dc:creator>Chad Von Lind</dc:creator>
				<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[hunting]]></category>
		<category><![CDATA[muzzleloading]]></category>
		<category><![CDATA[outdoors]]></category>
		<category><![CDATA[powderhorn]]></category>
		<category><![CDATA[sporting]]></category>
		<category><![CDATA[sports]]></category>
		<category><![CDATA[store]]></category>

		<guid isPermaLink="false">http://vonlind.com/?p=885</guid>
		<description><![CDATA[Another local north Idaho outfit was in need of an updated shopcart design and a better ecommerce software to manage their large customer database. I was responsible for creating this custom design, including the background photo that I took while out on a hunting trip. We then imported their 300+ product catalog into the database [...]]]></description>
			<content:encoded><![CDATA[<p>Another local north Idaho outfit was in need of an updated shopcart design and a better ecommerce software to manage their large customer database. I was responsible for creating this custom design, including the background photo that I took while out on a hunting trip. We then imported their 300+ product catalog into the database by the product import functionality offered with this software, making for a quick and easy store setup.</p>
<p><a href="http://bit.ly/pxpR4Z ">View The Website Here</a><img src="http://vonlind.com/?ak_action=api_record_view&#038;id=885&#038;type=feed" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://vonlind.com/2011/09/muzzleloading-pioneer-gear/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Show WordPress Child Pages Alongside Parent Page</title>
		<link>http://vonlind.com/2011/04/show-wordpress-child-pages-alongside-parent-page/</link>
		<comments>http://vonlind.com/2011/04/show-wordpress-child-pages-alongside-parent-page/#comments</comments>
		<pubDate>Tue, 12 Apr 2011 20:07:39 +0000</pubDate>
		<dc:creator>Chad Von Lind</dc:creator>
				<category><![CDATA[Tricks]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[nav]]></category>
		<category><![CDATA[pages]]></category>

		<guid isPermaLink="false">http://vonlind.com/?p=850</guid>
		<description><![CDATA[I recently needed some subpage code for a WordPress project. Darren Hoyt had a quick and easy solution to show the child pages of a parent page, only if the page had subpages. This was useful. My project needed to include the parent page at the top of the list of child pages, so I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p>I recently needed some subpage code for a WordPress project. Darren Hoyt had a <a href="http://www.darrenhoyt.com/2008/02/12/creating-two-tiered-conditional-navigation-in-wordpress">quick and easy solution</a> to show the child pages of a parent page, only if the page had subpages. This was useful. My project needed to include the parent page at the top of the list of child pages, so I&#8217;ve added a small modification to it.</p>
<p>This goes in your <code>page template</code> or <code>sidebar template</code> where you want your submenu to appear. It is outside the loop.</p>
<div class="wp_syntax">
<div class="code">
<pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
 <span style="color: #000088;">$parent_title</span> <span style="color: #339933;">=</span> get_the_title<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_parent</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;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_parent</span><span style="color: #009900;">&#41;</span>
 <span style="color: #000088;">$children</span> <span style="color: #339933;">=</span> wp_list_pages<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;title_li=&amp;sort_column=menu_order&amp;child_of=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_parent</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&amp;echo=0&amp;depth=1&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">else</span>
 <span style="color: #000088;">$children</span> <span style="color: #339933;">=</span> wp_list_pages<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;title_li=&amp;sort_column=menu_order&amp;child_of=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&amp;echo=0&amp;depth=1&quot;</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;">$children</span> <span style="color: #339933;">&amp;&amp;</span> is_page<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
     &lt;ul class=&quot;menu&quot;&gt;
       &lt;li <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_page<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_parent</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>class=&quot;current_page_item&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> get_permalink<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_parent</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$parent_title</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;&lt;/li&gt;
          <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$children</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
     &lt;/ul&gt;
 <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre>
</div>
</div>
<p><del datetime="2011-10-07T17:27:31+00:00">As it stands, the only issue with this code, is that when you are on the parent page, the class that identifies it as current does not appear. If you know of a solution for this, please do tell. </del></p>
<p><strong>Updated Oct 7th, 2011</strong> to include &#8220;current&#8221; state on parent page.<img src="http://vonlind.com/?ak_action=api_record_view&#038;id=850&#038;type=feed" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://vonlind.com/2011/04/show-wordpress-child-pages-alongside-parent-page/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Display All Attached Images to a WordPress Post</title>
		<link>http://vonlind.com/2011/03/display-all-attached-images-to-a-wordpress-post/</link>
		<comments>http://vonlind.com/2011/03/display-all-attached-images-to-a-wordpress-post/#comments</comments>
		<pubDate>Tue, 29 Mar 2011 20:29:39 +0000</pubDate>
		<dc:creator>Chad Von Lind</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[timthumb]]></category>

		<guid isPermaLink="false">http://vonlind.com/?p=835</guid>
		<description><![CDATA[This will allow you to use Timthumb while showing all images within a WordPress post gallery. In other words, if I upload 4 photos to a post, they will automatically be shown wherever I insert this code in my template, within that post&#8217;s loop. This is assuming that the timthumb script is in your theme&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>This will allow you to use <a href="http://vonlind.com/2008/06/adding-timthumb-to-your-wordpress-theme/">Timthumb</a> while showing all images within a WordPress post gallery. In other words, if I upload 4 photos to a post, they will automatically be shown wherever I insert this code in my template, within that post&#8217;s loop.</p>
<p>This is assuming that the timthumb script is in your theme&#8217;s directory: <code>wp-content/themes/mytheme/timthumb.php<br />
</code></p>
<div class="wp_syntax">
<div class="code">
<pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$args</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'post_type'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'attachment'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'orderby'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'menu_order'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'order'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'ASC'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'post_mime_type'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'image'</span> <span style="color: #339933;">,</span><span style="color: #0000ff;">'post_status'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'post_parent'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$attachments</span> <span style="color: #339933;">=</span> get_posts<span style="color: #009900;">&#40;</span><span style="color: #000088;">$args</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;">$attachments</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$attachments</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$attachment</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
      &lt;img src=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/thumb.php?w=200&amp;amp;h=200&amp;amp;zc=1&amp;amp;src=<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> wp_get_attachment_url<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$attachment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span> <span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; alt=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; width=&quot;200&quot; height=&quot;200&quot; border=&quot;0&quot; /&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>	<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre>
</div>
</div>
<p>To have each thumbnail link to the full sized original image, have the anchor href point to</p>
<div class="wp_syntax">
<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> wp_get_attachment_url<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$attachment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span> <span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre>
</div>
</div>
<p><img src="http://vonlind.com/?ak_action=api_record_view&#038;id=835&#038;type=feed" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://vonlind.com/2011/03/display-all-attached-images-to-a-wordpress-post/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Handmade Chocolate Shop</title>
		<link>http://vonlind.com/2011/01/handmade-chocolate-shop/</link>
		<comments>http://vonlind.com/2011/01/handmade-chocolate-shop/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 00:06:20 +0000</pubDate>
		<dc:creator>Chad Von Lind</dc:creator>
				<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[candy]]></category>
		<category><![CDATA[chocolate]]></category>

		<guid isPermaLink="false">http://vonlind.com/?p=570</guid>
		<description><![CDATA[This local store is known for making handmade gourmet chocolates and confections that you will enjoy and be proud to share with your friends, colleagues and loved-ones. They needed a store front that would allow for customers to order their products directly from the website. We worked with the store owner to include all of [...]]]></description>
			<content:encoded><![CDATA[<p>This local store is known for making handmade gourmet chocolates and confections that you will enjoy and be proud to share with your friends, colleagues and loved-ones. They needed a store front that would allow for customers to order their products directly from the website. We worked with the store owner to include all of the functionality he required in order to bring the best shopping experience to his customers.<img src="http://vonlind.com/?ak_action=api_record_view&#038;id=570&#038;type=feed" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://vonlind.com/2011/01/handmade-chocolate-shop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Make Your WordPress Post Look Nice When Shared On Facebook</title>
		<link>http://vonlind.com/2010/10/how-to-make-your-wordpress-post-look-nice-when-shared-on-facebook/</link>
		<comments>http://vonlind.com/2010/10/how-to-make-your-wordpress-post-look-nice-when-shared-on-facebook/#comments</comments>
		<pubDate>Thu, 07 Oct 2010 01:28:25 +0000</pubDate>
		<dc:creator>Chad Von Lind</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[sharing]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://vonlind.com/?p=539</guid>
		<description><![CDATA[Have you ever wondered how your WordPress posts might look when they&#8217;re shared on Facebook? If you&#8217;ve ever shared a link on your Facebook account, you&#8217;ve noticed the nifty Title, Image and Description that get automatically loaded to provide an attractive link. Depending on how your particular theme is built, sometimes you&#8217;ll have to cycle [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever wondered how your WordPress posts might look when they&#8217;re shared on Facebook?</p>
<p><img src="http://vonlind.com/wp-content/uploads/2010/10/sharing-links-on-facebook.png" alt="" title="sharing-wordpress-links-on-facebook" width="504" height="296" class="alignnone size-full wp-image-874" /></p>
<p>If you&#8217;ve ever shared a link on your Facebook account, you&#8217;ve noticed the nifty Title, Image and Description that get automatically loaded to provide an attractive link. Depending on how your particular theme is built, sometimes you&#8217;ll have to cycle through several images, before the actual appropriate post image shows up with your Facebook link.</p>
<p>Here is a bit of code you can <code>add to the head section of the header.php file of your theme</code> (Try adding it before the wp_head(); tag) to guarantee that your theme is optimized for Facebook link sharing. It will also make sure that the appropriate post image is the first one that Facebook looks for.</p>
<p><em>Code Last Updated June 3rd 2011</em></p>
<p>This update allows you to set the &#8220;Featured Image&#8221; as the the image that Facebook shows when your link is shared. Secondly, it allows you to set a default image, in case your post does not make use of a &#8220;featured image&#8221;. You can use <a href="http://vonlind.com/wp-content/themes/cvl2011/assets/imgs/default_icon.jpg">a promo graphic</a>, or your logo for this default, by saving it in your themes directory, in a <code>/images/</code> directory with the file name as  <code>default_icon.jpg</code>. Or you can alter the image directory in the code below</p>
<div class="wp_syntax">
<div class="code">
<pre class="php" style="font-family:monospace;">&nbsp;
&lt;!-- Begin FB Sharing for WP by Chad Von Lind. Get the latest code here: http://vonlind.com/?p=539  --&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #000088;">$thumb</span> <span style="color: #339933;">=</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'_thumbnail_id'</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$thumb</span> <span style="color: #339933;">=</span> wp_get_attachment_image_src<span style="color: #009900;">&#40;</span><span style="color: #000088;">$thumb</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$thumb</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$thumb</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$default_img</span> <span style="color: #339933;">=</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'stylesheet_directory'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/images/default_icon.jpg'</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>is_single<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> is_page<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;meta property=&quot;og:type&quot; content=&quot;article&quot; /&gt;
	&lt;meta property=&quot;og:title&quot; content=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> single_post_title<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;
	&lt;meta property=&quot;og:description&quot; content=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span>have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span>the_post<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$out_excerpt</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> get_the_excerpt<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> apply_filters<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'the_excerpt_rss'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$out_excerpt</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span> 	<span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;
	&lt;meta property=&quot;og:url&quot; content=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;/&gt;
	&lt;meta property=&quot;og:image&quot; content=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$thumb</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #009900; font-weight: bold;">null</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$default_img</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: #b1b100;">echo</span> <span style="color: #000088;">$thumb</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;meta property=&quot;og:type&quot; content=&quot;article&quot; /&gt;
   &lt;meta property=&quot;og:title&quot; content=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;
	&lt;meta property=&quot;og:url&quot; content=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;/&gt;
	&lt;meta property=&quot;og:description&quot; content=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'description'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;
    &lt;meta property=&quot;og:image&quot; content=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span>  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$thumb</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #009900; font-weight: bold;">null</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$default_img</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: #b1b100;">echo</span> <span style="color: #000088;">$thumb</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>  <span style="color: #009900;">&#125;</span>  <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;!-- End FB Sharing for WP --&gt;</pre>
</div>
</div>
<p><strong><em>Be Aware:</em></strong> Updating your code will not have immediate effects with Facebook, as Facebook will cache your shared link. It could take up to a few hours before the shared link would work properly. You can try to share one of your links that has not been shared before, to test that it is working proper.</p>
<p><em><strong>Coming soon:</strong></em> At the moment, if you don&#8217;t have an image set as &#8220;featured&#8221;, it will just default to your chosen default image in your theme directory. I&#8217;ll be adding the ability for it to check for the first image used in the post if there is no featured image. So the order will be 1) Featured, if not 2) First Image in post, if not 3) Use default image in theme directory.<img src="http://vonlind.com/?ak_action=api_record_view&#038;id=539&#038;type=feed" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://vonlind.com/2010/10/how-to-make-your-wordpress-post-look-nice-when-shared-on-facebook/feed/</wfw:commentRss>
		<slash:comments>47</slash:comments>
		</item>
		<item>
		<title>Allow Iframes In WordPress Posts</title>
		<link>http://vonlind.com/2010/09/allow-iframes-in-wordpress-posts/</link>
		<comments>http://vonlind.com/2010/09/allow-iframes-in-wordpress-posts/#comments</comments>
		<pubDate>Mon, 13 Sep 2010 20:39:00 +0000</pubDate>
		<dc:creator>Chad Von Lind</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[iframes]]></category>
		<category><![CDATA[tinymce]]></category>

		<guid isPermaLink="false">http://vonlind.com/?p=533</guid>
		<description><![CDATA[If you&#8217;ve ever tried adding an iframe to your WordPress post, and then switched the TinyMCE editor to Visual mode, you&#8217;ve found that the editor strips out your iframe code. This can be annoying. Just add this snippet to the functions.php file in your theme folder to prevent TinyMCE from killing your iframe. function add_iframe&#40;$initArray&#41; [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve ever tried adding an iframe to your WordPress post, and then switched the TinyMCE editor to Visual mode, you&#8217;ve found that the editor strips out your iframe code. This can be annoying. Just <strong>add this snippet to the functions.php file in your theme folder</strong> to prevent TinyMCE from killing your iframe.</p>
<div class="wp_syntax">
<div class="code">
<pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> add_iframe<span style="color: #009900;">&#40;</span><span style="color: #000088;">$initArray</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$initArray</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'extended_valid_elements'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;iframe[id|class|title|style|align|frameborder|height|longdesc|marginheight|marginwidth|name|scrolling|src|width]&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">return</span> <span style="color: #000088;">$initArray</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'tiny_mce_before_init'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'add_iframe'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p><img src="http://vonlind.com/?ak_action=api_record_view&#038;id=533&#038;type=feed" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://vonlind.com/2010/09/allow-iframes-in-wordpress-posts/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Timthumb and Shortcodes for Easy WordPress Images</title>
		<link>http://vonlind.com/2010/08/timthumb-and-shortcodes-for-easy-wordpress-images/</link>
		<comments>http://vonlind.com/2010/08/timthumb-and-shortcodes-for-easy-wordpress-images/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 21:51:50 +0000</pubDate>
		<dc:creator>Chad Von Lind</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[shortcodes]]></category>
		<category><![CDATA[timthumb]]></category>

		<guid isPermaLink="false">http://vonlind.com/?p=498</guid>
		<description><![CDATA[Here&#8217;s a quick and easy way to update image sizes on the fly directly in your WordPress posts. Add this code into your functions.php file in your theme. Then make sure you insert timthumb.php in the root of your theme directory. Next create a fully writable directory named &#8216;cache&#8217; and place that in your theme [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quick and easy way to update image sizes on the fly directly in your WordPress posts. Add this code into your functions.php file in your theme. Then make sure you insert <a href="http://timthumb.googlecode.com/svn/trunk/timthumb.php">timthumb.php</a> in the root of your theme directory. Next create a fully writable directory named &#8216;cache&#8217; and place that in your theme root directory.</p>
<p>Now inside your posts just wrap an image URL with the img shortcode. Add height, width, alt, and class to it for more flexibility.</p>
<p><strong>7/15/2011</strong> &#8211; Updated to allow use within a text widget.</p>
<div class="wp_syntax">
<div class="code">
<pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Image resize in content</span>
<span style="color: #666666; font-style: italic;">// To Use: {img w=600 h=200 class=alignleft alt=My Photo}http://mysite.com/photo.jpg{/img}</span>
<span style="color: #000000; font-weight: bold;">function</span> timmyimg<span style="color: #009900;">&#40;</span><span style="color: #000088;">$atts</span><span style="color: #339933;">,</span> <span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #990000;">extract</span><span style="color: #009900;">&#40;</span>shortcode_atts<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'w'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'600'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'h'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'250'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'class'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'alignnone'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'alt'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">''</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$atts</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">&quot;&lt;img src='&quot;</span><span style="color: #339933;">.</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_directory'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;/timthumb.php?src=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$content</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&amp;w=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$w</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&amp;h=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$h</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;' alt='&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$alt</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;' class='wp-post-img &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$class</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;' /&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_shortcode<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'img'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'timmyimg'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Allows this shortcode to work within a text widget</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'widget_text'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'do_shortcode'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p><img src='http://vonlind.com/wp-content/themes/cvl2011/thumb.php?src=http://vonlind.com/wp-content/uploads/2010/08/forrest_chadcoleman.jpg&#038;w=545&#038;h=200' alt='Forest' class='wp-post-img alignnone' /></p>
<p><img src='http://vonlind.com/wp-content/themes/cvl2011/thumb.php?src=http://vonlind.com/wp-content/uploads/2010/08/forrest_chadcoleman.jpg&#038;w=140&#038;h=100' alt='Forest' class='wp-post-img alignright' /></p>
<p><img src='http://vonlind.com/wp-content/themes/cvl2011/thumb.php?src=http://vonlind.com/wp-content/uploads/2010/08/forrest_chadcoleman.jpg&#038;w=382&#038;h=100' alt='Forest' class='wp-post-img alignleft' /><img src="http://vonlind.com/?ak_action=api_record_view&#038;id=498&#038;type=feed" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://vonlind.com/2010/08/timthumb-and-shortcodes-for-easy-wordpress-images/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress Thumbnails Outside The Loop</title>
		<link>http://vonlind.com/2010/06/wordpress-thumbnails-outside-the-loop/</link>
		<comments>http://vonlind.com/2010/06/wordpress-thumbnails-outside-the-loop/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 19:44:50 +0000</pubDate>
		<dc:creator>Chad Von Lind</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[the_post_image]]></category>
		<category><![CDATA[the_post_thumbnail]]></category>

		<guid isPermaLink="false">http://vonlind.com/?p=490</guid>
		<description><![CDATA[Occasionally you&#8217;ll need to fetch a posts image outside of the loop. &#60;?php $thumb = get_post_meta&#40;$post-&#62;ID,'_thumbnail_id',false&#41;; $thumb = wp_get_attachment_image_src&#40;$thumb&#91;0&#93;, false&#41;; $thumb = $thumb&#91;0&#93;;?&#62; &#160; &#60;img src=&#34;&#60;?php echo $thumb; ?&#62;&#34; alt=&#34;&#34; /&#62; Combine this with the Timthumb script for control over image size. IE: &#160; &#60;?php $thumb = get_post_meta&#40;$post-&#62;ID,'_thumbnail_id',false&#41;; $thumb = wp_get_attachment_image_src&#40;$thumb&#91;0&#93;, false&#41;; $thumb = $thumb&#91;0&#93;; [...]]]></description>
			<content:encoded><![CDATA[<p>Occasionally you&#8217;ll need to fetch a posts image outside of the loop.</p>
<div class="wp_syntax">
<div class="code">
<pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
    <span style="color: #000088;">$thumb</span> <span style="color: #339933;">=</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'_thumbnail_id'</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$thumb</span> <span style="color: #339933;">=</span> wp_get_attachment_image_src<span style="color: #009900;">&#40;</span><span style="color: #000088;">$thumb</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$thumb</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$thumb</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
   &lt;img src=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span>  <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$thumb</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; alt=&quot;&quot; /&gt;</pre>
</div>
</div>
<p>Combine this with the <a href="http://vonlind.com/2008/06/adding-timthumb-to-your-wordpress-theme/">Timthumb script</a> for control over image size. IE:</p>
<div class="wp_syntax">
<div class="code">
<pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
   <span style="color: #000088;">$thumb</span> <span style="color: #339933;">=</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'_thumbnail_id'</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #000088;">$thumb</span> <span style="color: #339933;">=</span> wp_get_attachment_image_src<span style="color: #009900;">&#40;</span><span style="color: #000088;">$thumb</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #000088;">$thumb</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$thumb</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> has_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;img src=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_directory'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/timthumb.php?src=<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$thumb</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&amp;amp;w=150&amp;amp;h=150&amp;amp;zc=1&quot;
        alt=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; width=&quot;150&quot; height=&quot;150&quot; /&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre>
</div>
</div>
<h3>Not Recommended, But Available Option</h3>
<p>This will output the URL to an image with the size predefined by &#8216;post-thumbnail&#8217; in your functions file when registering the functionality for post images.</p>
<div class="wp_syntax">
<div class="code">
<pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
    <span style="color: #000088;">$thumb</span> <span style="color: #339933;">=</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'_thumbnail_id'</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$thumb</span> <span style="color: #339933;">=</span> wp_get_attachment_image_src<span style="color: #009900;">&#40;</span><span style="color: #000088;">$thumb</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'my-custom-size'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$thumb</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$thumb</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$thumb</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre>
</div>
</div>
<p>The above code is referencing &#8216;my-custom-size&#8217;, which we can see below as being 405&#215;180. Typically <a href="http://wpengineer.com/the-ultimative-guide-for-the_post_thumbnail-in-wordpress-2-9/#comment-3053">it is not advised</a> to use these predefined sizes as it will overload your uploads directory with additional sizes, and it puts strain on your server when uploading images. Better to use the above method with the <a href="http://vonlind.com/2008/06/adding-timthumb-to-your-wordpress-theme/">Timthumb script</a> to get an exact image size, while making use of image caching.</p>
<div class="wp_syntax">
<div class="code">
<pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'add_theme_support'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">// Added in 2.9</span>
	add_theme_support<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'post-thumbnails'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	set_post_thumbnail_size<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">50</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">50</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Normal post thumbnails</span>
	add_image_size<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'my-custom-size'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">405</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">180</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre>
</div>
</div>
<p><img src="http://vonlind.com/?ak_action=api_record_view&#038;id=490&#038;type=feed" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://vonlind.com/2010/06/wordpress-thumbnails-outside-the-loop/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Design Color Scheme From A Photograph</title>
		<link>http://vonlind.com/2010/02/design-color-scheme-from-a-photograph/</link>
		<comments>http://vonlind.com/2010/02/design-color-scheme-from-a-photograph/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 19:31:43 +0000</pubDate>
		<dc:creator>Chad Von Lind</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Photography]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[color scheme]]></category>
		<category><![CDATA[colors]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[Inspiration]]></category>
		<category><![CDATA[photos]]></category>

		<guid isPermaLink="false">http://vonlind.com/?p=435</guid>
		<description><![CDATA[As a designer I find inspiration for color schemes from all over. From architecture, nature, to paintings and photographs. I&#8217;ve driven by houses with a great color scheme and thought to myself &#8220;That would make a great color scheme for a website!&#8221;. Using Photoshop&#8217;s Filter > Pixelate > Mosaic, we can grab a photograph and [...]]]></description>
			<content:encoded><![CDATA[<p>As a designer I find inspiration for color schemes from all over. From architecture, nature, to paintings and photographs. I&#8217;ve driven by houses with a great color scheme and thought to myself &#8220;That would make a great color scheme for a website!&#8221;.</p>
<p>Using Photoshop&#8217;s <strong>Filter > Pixelate > Mosaic</strong>, we can grab a photograph and find a great scheme from it! Hover the below photos to see the scheme they produce at 65 cell size. Photographs with a wide array of colors will work best.</p>
<p><a href="javascript:;" id="colorscheme01"><img src="http://vonlind.com/wp-content/uploads/2010/02/colorscheme-01.jpg" /></a></p>
<p><a href="javascript:;" id="colorscheme02"><img src="http://vonlind.com/wp-content/uploads/2010/02/colorscheme-02.jpg" /></a></p>
<p><a href="javascript:;" id="colorscheme03"><img src="http://vonlind.com/wp-content/uploads/2010/02/colorscheme-03.jpg" /></a></p>
<style type="text/css">
<!--
a#colorscheme01 {height:320px;width: 500px;overflow: hidden;display: block;padding:0;margin:0;}
a#colorscheme01 img {margin-top: -328px;border:none;}
a#colorscheme01:hover img {margin-top: -3px;}
a#colorscheme01:hover {height:320px;}
a#colorscheme02 {height:320px;width: 500px;overflow: hidden;display: block;padding:0;margin:0;}
a#colorscheme02 img {margin-top: -328px;border:none;}
a#colorscheme02:hover img {margin-top: -3px;}
a#colorscheme02:hover {height:320px;}
a#colorscheme03 {height:320px;width: 500px;overflow: hidden;display: block;padding:0;margin:0;}
a#colorscheme03 img {margin-top: -328px;border:none;}
a#colorscheme03:hover img {margin-top: -3px;}
a#colorscheme03:hover {height:320px;}
-->
</style>
<p><img src="http://vonlind.com/?ak_action=api_record_view&#038;id=435&#038;type=feed" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://vonlind.com/2010/02/design-color-scheme-from-a-photograph/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Embed Facebook Fan Page Photo Albums In WordPress</title>
		<link>http://vonlind.com/2010/01/embed-facebook-fan-page-photo-albums-in-wordpress/</link>
		<comments>http://vonlind.com/2010/01/embed-facebook-fan-page-photo-albums-in-wordpress/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 04:26:45 +0000</pubDate>
		<dc:creator>Chad Von Lind</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[albums]]></category>
		<category><![CDATA[fotobook]]></category>
		<category><![CDATA[photos]]></category>

		<guid isPermaLink="false">http://vonlind.com/?p=423</guid>
		<description><![CDATA[It is a great idea to have a Facebook fan page for your company, club or organization. This is a minor hack of the Fotobook plugin (Version 3.1.8) for WordPress by Aaron Harp. Fotobook is originally meant to apply your personal photo albums into WordPress, but we&#8217;re going to make one small code tweak to [...]]]></description>
			<content:encoded><![CDATA[<p>It is a great idea to have a Facebook fan page for your company, club or organization.</p>
<p>This is a minor hack of the <a href="http://wordpress.org/extend/plugins/fotobook/download/">Fotobook plugin (Version 3.1.8)</a> for WordPress by <a href="http://www.aaronharp.com/dev/wp-fotobook/">Aaron Harp</a>. Fotobook is originally meant to apply your personal photo albums into WordPress, but we&#8217;re going to make one small code tweak to instead pull the albums from the fan page that we administer.</p>
<p>After installing the plugin, go ahead and activate it and grant the permissions to your Facebook account.</p>
<p>Next, visit your Facebook fan page, and click into an album so you&#8217;re viewing all photos in one particular album. In the address bar you&#8217;ll see a <em>&#038;id=123123123</em>. Copy that ID number.</p>
<p>In the plugin directory open the fotobook.php file and head down to line 243 and look for this code.</p>
<p><code>$uid = $session['uid'];</code></p>
<p>Swap that code for this</p>
<p><code>//$uid = $session['uid'];<br />
$uid = 123123123;</code></p>
<p>With the 123123123 being the ID code for your fan page.</p>
<p>If you have a custom URL set for your fan page you might notice that the album photos are not showing. To correct that move down around line 809 in fotobook.php and look for:</p>
<p><code>if(!is_numeric($id)) return false;</code></p>
<p>And code it out of use by adding // in front so that it now looks like</p>
<p><code>//if(!is_numeric($id)) return false;</code></p>
<p>Back in the plugin administration page, go ahead and import your albums. And you should be good to go!</p>
<p><small>With a thanks to B. Thibault in the forums at the <a href="http://www.facebook.com/topic.php?uid=2254862517&#038;topic=10155">Fotobook Application Page</a>.</small><img src="http://vonlind.com/?ak_action=api_record_view&#038;id=423&#038;type=feed" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://vonlind.com/2010/01/embed-facebook-fan-page-photo-albums-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>53</slash:comments>
		</item>
	</channel>
</rss>

