<?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>Friendly (blog)</title>
	<atom:link href="http://blog.friendlywebconsulting.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.friendlywebconsulting.com</link>
	<description>The somewhat official blog of Friendly Web Consulting</description>
	<lastBuildDate>Fri, 26 Aug 2011 15:39:52 +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>Add post/page name + page parent name to body class</title>
		<link>http://blog.friendlywebconsulting.com/2011/07/add-page-and-parent-name-to-body-class/</link>
		<comments>http://blog.friendlywebconsulting.com/2011/07/add-page-and-parent-name-to-body-class/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 16:17:22 +0000</pubDate>
		<dc:creator>Michelle McGinnis</dc:creator>
				<category><![CDATA[WordPress Tips & Tricks]]></category>

		<guid isPermaLink="false">http://blog.friendlywebconsulting.com/?p=192</guid>
		<description><![CDATA[<p>This will add a page-slug class and a page-parent-slug class to your body tag, along with all the other defaults. Put this in your functions.php file:</p>
<p>Also make sure your open body tag looks like this (you can probably find it in header.php):</p>
<p>Many thanks to <a href="http://wpprogrammer.com/snippets/add-post-page-name-to-body-class/">Utkarsh Kuketri</a> for the original function!</p>
]]></description>
			<content:encoded><![CDATA[<p>This will add a page-slug class and a page-parent-slug class to your body tag, along with all the other defaults. Put this in your functions.php file:</p>
<pre class="brush: php; title: ; notranslate">
function wpprogrammer_post_name_in_body_class( $classes ){
if( is_singular() ) {
     global $post;
     $parent = get_page($post-&gt;post_parent);
     array_push( $classes, &quot;{$post-&gt;post_type}-{$post-&gt;post_name}&quot; );
     array_push( $classes, &quot;{$post-&gt;post_type}-parent-{$parent-&gt;post_name}&quot; );
     }
return $classes;
}
add_filter( 'body_class', 'wpprogrammer_post_name_in_body_class' );
</pre>
<p>Also make sure your open body tag looks like this (you can probably find it in header.php):</p>
<pre class="brush: php; title: ; notranslate">

&lt;body &lt;?php body_class(); ?&gt;&gt;
</pre>
<p>Many thanks to <a href="http://wpprogrammer.com/snippets/add-post-page-name-to-body-class/">Utkarsh Kuketri</a> for the original function!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.friendlywebconsulting.com/2011/07/add-page-and-parent-name-to-body-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Display WordPress featured image, thumbnail, or YouTube thumb</title>
		<link>http://blog.friendlywebconsulting.com/2011/06/display-wordpress-featured-image-thumbnail-or-youtube-thumb/</link>
		<comments>http://blog.friendlywebconsulting.com/2011/06/display-wordpress-featured-image-thumbnail-or-youtube-thumb/#comments</comments>
		<pubDate>Thu, 30 Jun 2011 18:24:22 +0000</pubDate>
		<dc:creator>Michelle McGinnis</dc:creator>
				<category><![CDATA[WordPress Tips & Tricks]]></category>

		<guid isPermaLink="false">http://blog.friendlywebconsulting.com/?p=177</guid>
		<description><![CDATA[<p>Huge thanks to Vladimir Prelovac, who wrote <a href="http://www.prelovac.com/vladimir/simple-wordpress-thumbnail-function">the original function</a>. I use it a ton and have adapted it a bit to check for:</p>
<ol>
<li>Featured image; then</li>
<li>First image attached to the post; then</li>
<li>The first image inserted in the post; then</li>
<li>The thumbnail of the first YouTube video inserted in the post</li>
</ol>
<p>All I added was the&#8230; <a href="http://blog.friendlywebconsulting.com/2011/06/display-wordpress-featured-image-thumbnail-or-youtube-thumb/" class="read_more">Read the rest</a></p>]]></description>
			<content:encoded><![CDATA[<p>Huge thanks to Vladimir Prelovac, who wrote <a href="http://www.prelovac.com/vladimir/simple-wordpress-thumbnail-function">the original function</a>. I use it a ton and have adapted it a bit to check for:</p>
<ol>
<li>Featured image; then</li>
<li>First image attached to the post; then</li>
<li>The first image inserted in the post; then</li>
<li>The thumbnail of the first YouTube video inserted in the post</li>
</ol>
<p>All I added was the featured image bit. <img src='http://blog.friendlywebconsulting.com/logmeinplz/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Here&#8217;s the full function, which should be inserted in your theme&#8217;s functions.php file: [UPDATED 2011.08.26 to scan for youtu.be URLs as well as the traditional youtube.com URL]</p>
<pre class="brush: php; gutter: true; first-line: 1">// Note that your theme must support post thumbnails for this function to work.
// If you are getting an error try adding add_theme_support('post-thumbnails'); to your functions. php file
function vp_get_thumb_url($text, $size){
    global $post;
    $imageurl="";

    // Check to see which image is set as "Featured Image"
    $featuredimg = get_post_thumbnail_id($post-&gt;ID);
    // Get source for featured image
    $img_src = wp_get_attachment_image_src($featuredimg, $size);
    // Set $imageurl to Featured Image
    $imageurl=$img_src[0];

    // If there is no "Featured Image" set, move on and get the first image attached to the post
    if (!$imageurl) {
        // Extract the thumbnail from the first attached imaged
        $allimages =&amp;get_children('post_type=attachment&amp;post_mime_type=image&amp;post_parent=' . $post-&gt;ID );

        foreach ($allimages as $img){
            $img_src = wp_get_attachment_image_src($img-&gt;ID, $size);
            break;
        }
        // Set $imageurl to first attached image
        $imageurl=$img_src[0];
    }

    // If there is no image attached to the post, look for anything that looks like an image and get that
    if (!$imageurl) {
        preg_match('/&lt;\s*img [^\&gt;]*src\s*=\s*[\""\']?([^\""\'&gt;]*)/i' ,  $text, $matches);
        $imageurl=$matches[1];
    }

    // If there's no image attached or inserted in the post, look for a YouTube video
    if (!$imageurl){
        // look for traditional youtube.com url from address bar
        preg_match("/([a-zA-Z0-9\-\_]+\.|)youtube\.com\/watch(\?v\=|\/v\/)([a-zA-Z0-9\-\_]{11})([^&lt;\s]*)/", $text, $matches2);
        $youtubeurl = $matches2[0];
        $videokey = $matches2[3];
    if (!$youtubeurl) {
        // look for youtu.be 'embed' url
        preg_match("/([a-zA-Z0-9\-\_]+\.|)youtu\.be\/([a-zA-Z0-9\-\_]{11})([^&lt;\s]*)/", $text, $matches2);
        $youtubeurl = $matches2[0];
        $videokey = $matches2[2];
    }
    if ($youtubeurl)
        // Get the thumbnail YouTube automatically generates
        // '0' is the biggest version, use 1 2 or 3 for smaller versions
        $imageurl = "http://i.ytimg.com/vi/{$videokey}/0.jpg";
    }

    // Spit out the image path
    return $imageurl;
}</pre>
<p>Put the following in the Loop wherever you&#8217;d like the image to display (wrapped in open/close php tags).</p>
<pre class="brush: php; title: ; notranslate">
// Show featured image, or first image if no featured, or YouTube thumbnail
if (function_exists('vp_get_thumb_url')) {

// Set the desired image size. Swap out 'thumbnail' for 'medium', 'large', or custom size
$thumb=vp_get_thumb_url($post-&gt;post_content, 'thumbnail');

if ($thumb!='') { ?&gt;

&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot; title=&quot;&lt;?php the_title(); ?&gt;&quot; rel=&quot;bookmark&quot;&gt;&lt;img class=&quot;alignleft&quot; src=&quot;&lt;?php echo $thumb; ?&gt;&quot; alt=&quot;&lt;?php get_the_title(); ?&gt;&quot; /&gt;&lt;/a&gt;

&lt;?php }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.friendlywebconsulting.com/2011/06/display-wordpress-featured-image-thumbnail-or-youtube-thumb/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Talk about handy! One Page Apps &#124; CSS-Tricks</title>
		<link>http://blog.friendlywebconsulting.com/2011/06/talk-about-handy-one-page-apps-css-tricks/</link>
		<comments>http://blog.friendlywebconsulting.com/2011/06/talk-about-handy-one-page-apps-css-tricks/#comments</comments>
		<pubDate>Thu, 30 Jun 2011 03:34:40 +0000</pubDate>
		<dc:creator>Michelle McGinnis</dc:creator>
				<category><![CDATA[General Web Coolness]]></category>

		<guid isPermaLink="false">http://blog.friendlywebconsulting.com/?p=173</guid>
		<description><![CDATA[<p>I&#8217;ve used CSS3Please a tone, but many of the others are new to me &#8211; and so handy! I love CSS-Tricks.com.  </p>
<p><a href="http://css-tricks.com/12389-one-page-apps-i-actually-use/">http://css-tricks.com/12389-one-page-apps-i-actually-use/</a></p>
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve used CSS3Please a tone, but many of the others are new to me &#8211; and so handy! I love CSS-Tricks.com. <img src='http://blog.friendlywebconsulting.com/logmeinplz/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://css-tricks.com/12389-one-page-apps-i-actually-use/">http://css-tricks.com/12389-one-page-apps-i-actually-use/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.friendlywebconsulting.com/2011/06/talk-about-handy-one-page-apps-css-tricks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>10 Techniques for Customizing the WordPress Admin Panel</title>
		<link>http://blog.friendlywebconsulting.com/2011/04/10-techniques-for-customizing-the-wordpress-admin-panel/</link>
		<comments>http://blog.friendlywebconsulting.com/2011/04/10-techniques-for-customizing-the-wordpress-admin-panel/#comments</comments>
		<pubDate>Fri, 01 Apr 2011 20:31:22 +0000</pubDate>
		<dc:creator>Michelle McGinnis</dc:creator>
				<category><![CDATA[WordPress Tips & Tricks]]></category>

		<guid isPermaLink="false">http://blog.friendlywebconsulting.com/?p=168</guid>
		<description><![CDATA[<p><a href="http://sixrevisions.com/wordpress/10-techniques-for-customizing-the-wordpress-admin-panel/">Great article from Six Revisions</a> with lots of tips to customize both the dashboard and entire WordPress control panel.</p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://sixrevisions.com/wordpress/10-techniques-for-customizing-the-wordpress-admin-panel/">Great article from Six Revisions</a> with lots of tips to customize both the dashboard and entire WordPress control panel.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.friendlywebconsulting.com/2011/04/10-techniques-for-customizing-the-wordpress-admin-panel/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Stack Exchange-like voting for WordPress</title>
		<link>http://blog.friendlywebconsulting.com/2011/03/stack-exchange-plugin/</link>
		<comments>http://blog.friendlywebconsulting.com/2011/03/stack-exchange-plugin/#comments</comments>
		<pubDate>Wed, 23 Mar 2011 20:03:18 +0000</pubDate>
		<dc:creator>Michelle McGinnis</dc:creator>
				<category><![CDATA[WordPress Tips & Tricks]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://blog.friendlywebconsulting.com/?p=161</guid>
		<description><![CDATA[<p>Finally, a StackExchange-like plugin for WordPress! I haven&#8217;t used it yet but <a href="http://wordpress.org/extend/plugins/cubepoints/">CubePoints</a> looks very promising.</p>
]]></description>
			<content:encoded><![CDATA[<p>Finally, a StackExchange-like plugin for WordPress! I haven&#8217;t used it yet but <a href="http://wordpress.org/extend/plugins/cubepoints/">CubePoints</a> looks very promising.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.friendlywebconsulting.com/2011/03/stack-exchange-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Validation as you type</title>
		<link>http://blog.friendlywebconsulting.com/2011/03/validation-as-you-type/</link>
		<comments>http://blog.friendlywebconsulting.com/2011/03/validation-as-you-type/#comments</comments>
		<pubDate>Thu, 03 Mar 2011 18:48:11 +0000</pubDate>
		<dc:creator>Michelle McGinnis</dc:creator>
				<category><![CDATA[Web Design Insights]]></category>

		<guid isPermaLink="false">http://blog.friendlywebconsulting.com/?p=157</guid>
		<description><![CDATA[<p><a href="http://uxmovement.com/forms/how-instant-validation-can-speed-up-long-forms">An interesting article from UXExchange</a> on validating forms as a user fills them out.</p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://uxmovement.com/forms/how-instant-validation-can-speed-up-long-forms">An interesting article from UXExchange</a> on validating forms as a user fills them out.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.friendlywebconsulting.com/2011/03/validation-as-you-type/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TwentyTen Five &#8211; The HTML5 WordPress theme</title>
		<link>http://blog.friendlywebconsulting.com/2011/02/use-html5-in-wordpress-twentyten-twentyten-five-the-html5-wordpress-theme/</link>
		<comments>http://blog.friendlywebconsulting.com/2011/02/use-html5-in-wordpress-twentyten-twentyten-five-the-html5-wordpress-theme/#comments</comments>
		<pubDate>Wed, 23 Feb 2011 22:21:42 +0000</pubDate>
		<dc:creator>Michelle McGinnis</dc:creator>
				<category><![CDATA[WordPress Tips & Tricks]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[themes]]></category>

		<guid isPermaLink="false">http://blog.friendlywebconsulting.com/?p=141</guid>
		<description><![CDATA[<p>A very good <a href="http://www.smashingmagazine.com/2011/02/22/using-html5-to-transform-wordpress-twentyten-theme/">Smashing Magazine article</a> came out the other day explaining how to convert the WordPress TwentyTen theme to HTML5. Here&#8217;s that theme for download:</p>
<p><a href="http://www.twentytenfive.com/">http://www.twentytenfive.com/</a></p>
]]></description>
			<content:encoded><![CDATA[<p>A very good <a href="http://www.smashingmagazine.com/2011/02/22/using-html5-to-transform-wordpress-twentyten-theme/">Smashing Magazine article</a> came out the other day explaining how to convert the WordPress TwentyTen theme to HTML5. Here&#8217;s that theme for download:</p>
<p><a href="http://www.twentytenfive.com/">http://www.twentytenfive.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.friendlywebconsulting.com/2011/02/use-html5-in-wordpress-twentyten-twentyten-five-the-html5-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Daily Tip: Add More Automatic Image Sizes to the WordPress Media Library</title>
		<link>http://blog.friendlywebconsulting.com/2011/02/daily-tip-add-more-automatic-image-sizes-to-the-wordpress-media-library/</link>
		<comments>http://blog.friendlywebconsulting.com/2011/02/daily-tip-add-more-automatic-image-sizes-to-the-wordpress-media-library/#comments</comments>
		<pubDate>Tue, 22 Feb 2011 21:30:26 +0000</pubDate>
		<dc:creator>Michelle McGinnis</dc:creator>
				<category><![CDATA[WordPress Tips & Tricks]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[media]]></category>

		<guid isPermaLink="false">http://blog.friendlywebconsulting.com/?p=136</guid>
		<description><![CDATA[<p>Great tip from the WPMU blog, and one I&#8217;d been seeking for a while. This gives you the ability to not only add new image sizes, but to have them show up in the Media popover so that users can &#8220;Insert (the new image size) into Post&#8221;. <a href="http://networkedblogs.com/eCP0w">http://networkedblogs.com/eCP0w</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Great tip from the WPMU blog, and one I&#8217;d been seeking for a while. This gives you the ability to not only add new image sizes, but to have them show up in the Media popover so that users can &#8220;Insert (the new image size) into Post&#8221;. <a href="http://networkedblogs.com/eCP0w">http://networkedblogs.com/eCP0w</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.friendlywebconsulting.com/2011/02/daily-tip-add-more-automatic-image-sizes-to-the-wordpress-media-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Variables with PHP &#124; CSS-Tricks</title>
		<link>http://blog.friendlywebconsulting.com/2011/02/css-variables-with-php-css-tricks/</link>
		<comments>http://blog.friendlywebconsulting.com/2011/02/css-variables-with-php-css-tricks/#comments</comments>
		<pubDate>Tue, 22 Feb 2011 19:01:04 +0000</pubDate>
		<dc:creator>Michelle McGinnis</dc:creator>
				<category><![CDATA[General Web Coolness]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://blog.friendlywebconsulting.com/?p=132</guid>
		<description><![CDATA[<p>Awesome trick enabling you to use variables in CSS files. Would be great for themes with user-selectable style elements.</p>
<p><a href="http://css-tricks.com/css-variables-with-php/">http://css-tricks.com/css-variables-with-php/</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Awesome trick enabling you to use variables in CSS files. Would be great for themes with user-selectable style elements.</p>
<p><a href="http://css-tricks.com/css-variables-with-php/">http://css-tricks.com/css-variables-with-php/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.friendlywebconsulting.com/2011/02/css-variables-with-php-css-tricks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JQuery Sliders</title>
		<link>http://blog.friendlywebconsulting.com/2011/02/jquery-sliders/</link>
		<comments>http://blog.friendlywebconsulting.com/2011/02/jquery-sliders/#comments</comments>
		<pubDate>Fri, 11 Feb 2011 05:17:27 +0000</pubDate>
		<dc:creator>Michelle McGinnis</dc:creator>
				<category><![CDATA[General Web Coolness]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[slideshow]]></category>

		<guid isPermaLink="false">http://blog.friendlywebconsulting.com/?p=105</guid>
		<description><![CDATA[<p>Some good sliders, including the WOW slider I&#8217;d like to try out when I next have the chance: <a href="http://plugins.jquery.com/projects/plugins?type=48">http://plugins.jquery.com/projects/plugins?type=48</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Some good sliders, including the WOW slider I&#8217;d like to try out when I next have the chance: <a href="http://plugins.jquery.com/projects/plugins?type=48">http://plugins.jquery.com/projects/plugins?type=48</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.friendlywebconsulting.com/2011/02/jquery-sliders/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

