<?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/tag/wordpress/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>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>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>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>
		<item>
		<title>Remove and Prevent Revisions in WordPress</title>
		<link>http://vonlind.com/2009/06/remove-and-prevent-revisions-in-wordpress/</link>
		<comments>http://vonlind.com/2009/06/remove-and-prevent-revisions-in-wordpress/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 19:49:51 +0000</pubDate>
		<dc:creator>Chad Von Lind</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[revisions]]></category>

		<guid isPermaLink="false">http://vonlind.com?p=259</guid>
		<description><![CDATA[I recently noticed that a particular post had built up about 10 or 15 revisions for it. I started thinking that of all the posts I have, there have to be quite a few revisions and therefore are creating a hefty sized table in my database. This was run on my WP 2.8, but should [...]]]></description>
			<content:encoded><![CDATA[<p>I recently noticed that a particular post had built up about 10 or 15 revisions for it. I started thinking that of all the posts I have, there have to be quite a few revisions and therefore are creating a hefty sized table in my database. This was run on my WP 2.8, but should work for 2.6 and up.</p>
<p>Here is a solution to prevent revisions from being created, as well as removing all revisions from your database.</p>
<h3>Prevent Revision Creation</h3>
<p>Open wp-config.php and add this to the very bottom of the file, before the php closing tag.</p>
<p><code>define('WP_POST_REVISIONS', false);</code></p>
<p>This completely turns off any revision creation. If you&#8217;d like to restrict revision creation to a set amount per post, you can change &#8216;false&#8217; for the number of revisions you&#8217;d like stored.</p>
<h3>Remove All Revisions From Database</h3>
<p>Open up your database in phpmyadmin and run this SQL Query.</p>
<p><code>DELETE FROM wp_posts WHERE post_type = "revision";</code></p>
<p>And now you&#8217;ll have a more tidy database.<img src="http://vonlind.com/?ak_action=api_record_view&#038;id=259&#038;type=feed" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://vonlind.com/2009/06/remove-and-prevent-revisions-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install WordPress On a Local Server</title>
		<link>http://vonlind.com/2009/04/install-wordpress-on-a-local-server/</link>
		<comments>http://vonlind.com/2009/04/install-wordpress-on-a-local-server/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 19:07:02 +0000</pubDate>
		<dc:creator>Chad Von Lind</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://vonlind.com?p=191</guid>
		<description><![CDATA[In this tutorial, we&#8217;ll go through the process of setting up a server on your local computer. This will allow you to run PHP &#038; MySQL applications, such as WordPress, directly on your machine. As I have yet resisted joining the ranks of the Mac cult, we&#8217;ll be using PC server software. I am aware [...]]]></description>
			<content:encoded><![CDATA[<p class="intro">In this tutorial, we&#8217;ll go through the process of setting up a server on your local computer. This will allow you to run PHP &#038; MySQL applications, such as WordPress, directly on your machine.</p>
<p>As I have yet resisted joining the ranks of the <a href="http://vonlind.com/wp-content/uploads/2009/04/apple-cult.jpg">Mac cult</a>, we&#8217;ll be using PC server software. I am aware of <a href="http://www.apachefriends.org/en/xampp.html">XAMPP</a>, <a href="http://www.wampserver.com/en/">WAMP</a>, and I personally use <a href="http://vertrigo.sourceforge.net/">VertrigoServ</a> for no other reason than it is the only one I&#8217;ve tried. (Mac cultists can use <a href="http://www.mamp.info/">MAMP</a>.)</p>
<h3>This Tutorial Is Based On <a href="http://vertrigo.sourceforge.net/">VertrigoServ</a></h3>
<p>They say that cleanliness is next to godliness, and in that vein let us install our server in a organized location. On my desktop, I actually use a whole separate hard drive to store my server. If you don&#8217;t have the luxury of a dedicated HDD, then your local disk or C:\ will be fine.</p>
<h3>01. Installing The Server</h3>
<p>Create the following directory: <code>C:\usr\</code>. Then run the server installer, and be sure to install the software in the <code>C:\usr\</code> location.  If you installed the VertrigoServ software, then the &#8220;public web&#8221; files will be located in <code>C:\usr\www\</code>. So let&#8217;s <a href="http://wordpress.org/download">download</a> and install WordPress inside <code>C:\usr\www\wordpress\</code> and then be sure to fire the server up after installation.</p>
<h3>02. Setup The Database</h3>
<p>So we&#8217;ll need to have a database created before we can install WordPress. In your web browser, navigate to <a href="http://localhost/phpmyadmin">http://localhost/phpmyadmin</a> and login. There should be the default user and password if this is your first time. Find it by clicking the VertrigoServ icon in the bottom right tray, and selecting &#8220;Help and Readme&#8221;. Be sure to change your passwords once you get in. Default login is root/vertrigo.</p>
<p>Now that we&#8217;re in PHPmyAdmin, let&#8217;s create a database for our local WordPress install. Type in your desired database name, and hit the &#8220;Create&#8221; button.</p>
<p><img src="http://vonlind.com/wp-content/uploads/2009/04/wpdb-create.jpg" alt="wpdb-create" title="wpdb-create" width="500" height="172" class="alignnone size-full wp-image-199" /></p>
<h3>03. Installing WordPress</h3>
<p>With the database created, we can now input our database details into the <code>wp-config.php</code> file of our WP install.</p>
<div class="wp_syntax">
<div class="code">
<pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// ** MySQL settings ** //</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'DB_NAME'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'database_name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>    <span style="color: #666666; font-style: italic;">// The name of the database from step 2</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'DB_USER'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'root'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>     <span style="color: #666666; font-style: italic;">// Vertrigo uses root as the default username</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'DB_PASSWORD'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'vertrigo_password'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// the password used to get into your local phpmyadmin</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'DB_HOST'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'localhost'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>    <span style="color: #666666; font-style: italic;">// 99% chance you won't need to change this value</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'DB_CHARSET'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'utf8'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'DB_COLLATE'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p>Now we can pull open our browser, and navigate to <a href="http://localhost/wordpress">http://localhost/wordpress</a> and begin the installation of WordPress.</p>
<p class="info">The <code>http://localhost/</code>  address looks into the <code>\usr\www\</code> directory. So whatever the name of the directory we installed in, is what we&#8217;ll need to punch in after localhost/. For example, if I installed an application in <code>\usr\cms\</code>, I will need to navigate to http://localhost/cms in order to pull up that site.</p>
<p><img src="http://vonlind.com/?ak_action=api_record_view&#038;id=191&#038;type=feed" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://vonlind.com/2009/04/install-wordpress-on-a-local-server/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Web Design Tricks</title>
		<link>http://vonlind.com/2009/01/web-design-tricks/</link>
		<comments>http://vonlind.com/2009/01/web-design-tricks/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 23:22:35 +0000</pubDate>
		<dc:creator>Chad Von Lind</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://vonlind.com?p=105</guid>
		<description><![CDATA[Here is a round up of some very useful tricks and snippets for web designers. Resizeable Background Image with jQuery 15 Wicked CSS Tricks Build a jQuery Interactive Map Better Way To Register the WP Sidebar]]></description>
			<content:encoded><![CDATA[<p>Here is a round up of some very useful tricks and snippets for web designers.</p>
<ul>
<li><a href='http://css-tricks.com/how-to-resizeable-background-image/'>Resizeable Background Image with jQuery</a></li>
<li><a href="http://devsnippets.com/reviews/css-code-snippets-15-wicked-tricks.html">15 Wicked CSS Tricks</a></li>
<li><a href="http://www.newmediacampaigns.com/page/jquery-vs-flash-for-interactive-map">Build a jQuery Interactive Map</a></li>
<li><a href="http://wpengineer.com/wordpress-and-register_sidebar">Better Way To Register the WP Sidebar</a></li>
</ul>
<p><img src="http://vonlind.com/?ak_action=api_record_view&#038;id=105&#038;type=feed" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://vonlind.com/2009/01/web-design-tricks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

