<?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/"
	xmlns:series="http://unfoldingneurons.com/"
	>
<channel>
	<title>Artist as Designer: Marilyn Fenn Design &#187; Coding</title>
	<atom:link href="http://marilynfenndesign.com/tag/coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://marilynfenndesign.com</link>
	<description>Design tips and ideas from an artist and designer’s point of view</description>
	<lastBuildDate>Fri, 06 Jan 2012 22:59:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Using Featured Images in WordPress Websites</title>
		<link>http://marilynfenndesign.com/using-featured-images-in-wordpress-websites/</link>
		<comments>http://marilynfenndesign.com/using-featured-images-in-wordpress-websites/#comments</comments>
		<pubDate>Mon, 27 Jun 2011 14:41:52 +0000</pubDate>
		<dc:creator>Marilyn</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Artisteer]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[featured image]]></category>
		<category><![CDATA[post thumbnail]]></category>
		<category><![CDATA[theme design]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://marilynfenndesign.com/?p=2273</guid>
		<description><![CDATA[Code fixes for the Featured Image and Post Thumbnail functions in Artisteer themes for WordPress.
When WordPress came out with version 2.9 in the fall of 2010, one of the best things they added was the Post Thumbnail for featured images.
For art sites, this was something of a Godsend.]]></description>
			<content:encoded><![CDATA[<h4>WordPress Post Thumbnail</h4>
<div id="attachment_2286" class="wp-caption alignright" style="width: 210px"><img class="size-thumbnail wp-image-2286" title="Post Thumbnails in the Blog List View" src="http://marilynfenndesign.com/wp-content/uploads/2011/06/Post-Thumbnails-in-the-Blog-List-View1-200x200.jpg" alt="Post Thumbnails in the Blog List View" width="200" height="200" /><p class="wp-caption-text">Post Thumbnails in the Blog List View</p></div>
<p>When WordPress came out with version 2.9 in the fall of 2010, one of the best things they added was the <strong>Post Thumbnail</strong> for featured images.</p>
<p>For art sites, this was something of a Godsend.  I had previously been using YAPB (Yet Another PhotoBlog) for inserting one image as the main image for each post.  This one image would then appear at different sizes in different types of views, such as a small thumbnail in the blog, archive and category list view, and a large image in the single post view.</p>
<p>But, my hosting service <em>strongly</em> encouraged me to stop using YAPB, as they said it was very resource-intensive and was one of several plugins for WordPress that were causing my sites to bog down.  So I spent <em>weeks</em> replacing the YAPB images on almost 6 years worth of posts on my art site (nearly 300 posts) with the new featured images post-thumbnails <em>(whew!)</em>.  I also edited the code files to get the images to appear just as I wanted them at the time.</p>
<p>It was exhaustive but in the end a very good thing, because once again, all I had to do was insert one image in my post, and it showed up in many places, while apparently using less resources.</p>
<p>See examples of Post Thumbnails and Featured Images in use:</p>
<div class="ngg-galleryoverview" id="ngg-gallery-1-2273">
	<!-- Thumbnails -->
	<div id="ngg-image-1" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://marilynfenndesign.com/wp-content/gallery/featured-images/1-post-thumbnails-in-the-blog-list-view.jpg" title="1 - Post thumbnails in the blog list view"  >
								<img title="1 - Post thumbnails in the blog list view" alt="1 - Post thumbnails in the blog list view" src="http://marilynfenndesign.com/wp-content/gallery/featured-images/thumbs/thumbs_1-post-thumbnails-in-the-blog-list-view.jpg" width="65" height="65" />
							</a>
		</div>
	</div>
	<div id="ngg-image-2" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://marilynfenndesign.com/wp-content/gallery/featured-images/2-featured-image-from-post-thumbnail-in-single-post-view.jpg" title="2 - Featured image from post-thumbnail in single post view"  >
								<img title="2 - Featured image from post-thumbnail in single post view" alt="2 - Featured image from post-thumbnail in single post view" src="http://marilynfenndesign.com/wp-content/gallery/featured-images/thumbs/thumbs_2-featured-image-from-post-thumbnail-in-single-post-view.jpg" width="65" height="65" />
							</a>
		</div>
	</div>
	<div id="ngg-image-3" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://marilynfenndesign.com/wp-content/gallery/featured-images/3-using-post-thumbnail-for-related-posts.jpg" title="3 - Using post thumbnail for related posts"  >
								<img title="3 - Using post thumbnail for related posts" alt="3 - Using post thumbnail for related posts" src="http://marilynfenndesign.com/wp-content/gallery/featured-images/thumbs/thumbs_3-using-post-thumbnail-for-related-posts.jpg" width="65" height="65" />
							</a>
		</div>
	</div>
	<div id="ngg-image-7" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://marilynfenndesign.com/wp-content/gallery/featured-images/4-set-featured-image_0.jpg" title="4 - Set featured image in a post or page"  >
								<img title="4 - Set featured image in a post or page" alt="4 - Set featured image in a post or page" src="http://marilynfenndesign.com/wp-content/gallery/featured-images/thumbs/thumbs_4-set-featured-image_0.jpg" width="65" height="65" />
							</a>
		</div>
	</div>
	<div id="ngg-image-5" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://marilynfenndesign.com/wp-content/gallery/featured-images/5-use-as-featured-image.jpg" title="5 - Use uploaded image as featured image in a post or page"  >
								<img title="5 - Use uploaded image as featured image in a post or page" alt="5 - Use uploaded image as featured image in a post or page" src="http://marilynfenndesign.com/wp-content/gallery/featured-images/thumbs/thumbs_5-use-as-featured-image.jpg" width="65" height="65" />
							</a>
		</div>
	</div>
	<div id="ngg-image-9" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://marilynfenndesign.com/wp-content/gallery/featured-images/6-the-featured-image_0.jpg" title="6 - The featured image in a post or page (edit view)"  >
								<img title="6 - The featured image in a post or page (edit view)" alt="6 - The featured image in a post or page (edit view)" src="http://marilynfenndesign.com/wp-content/gallery/featured-images/thumbs/thumbs_6-the-featured-image_0.jpg" width="65" height="65" />
							</a>
		</div>
	</div>
	<!-- Pagination -->
 	<div class="ngg-clear"></div>
</div>
<h4>Issues with New Designs</h4>
<p>One of the other great things about WordPress is that they are very innovative and are continually improving their features and code, streamlining some things and adding others.  The result is that what was once just a little blog engine has become the most popular and one of the most powerful and versatile CMSs (Content Management Systems) around.  Of course, the downside of that can be that your website themes and files can become quickly outdated, requiring more weeks of learning and re-coding to keep things up to date.</p>
<p>For that reason, I often use a website design tool called Artisteer to begin a new design for my websites.  Once you have settled on a design within the software, it spits out (almost) all the files and images one needs for various types of websites, including WordPress websites.  Every exported design needs a bit (or more) of design and code tweaking to get them to look and work just the way I want them to, but otherwise it&#8217;s a pretty good tool.</p>
<p>However, all this innovation has resulted in some significant changes in the code for WordPress, and thus the code that Artisteer generates in their latest version has also changed quite a bit in just a few months.  And unhappily, from my perspective, they broke the featured image function.</p>
<p>For whatever reason, the themes exported from Artisteer no longer support the large image part of the Post Thumbnail function.   Personally, I&#8217;ve got too much invested in this feature on far too many websites to abandon the use of it (especially as it would mean replacing all 300 images I&#8217;d already replaced yet again!  And then some!).</p>
<p>So I&#8217;ve searched the web, and asked questions on several forums to find answers about how to fix this, but only one person was willing or able to give me a hint.  (Hat tip to Amy on the Artisteer forums <img src='http://marilynfenndesign.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ).</p>
<p>So, with Amy&#8217;s help, and a bit more research and a lot of trial and error, I have come up with the following code fixes.  These may not be the only or even best ways to do these things, but they work for me so far.  Should anyone know of a better way, I&#8217;m all ears!</p>
<h4>Code Fixes for the Featured Image and Post Thumbnail Functions in Artisteer Themes</h4>
<p>To enable Artisteer-generated files to once again implement the featured image function (files shown in <em><strong>bold italic</strong></em>; code show in <strong>bold</strong>):</p>
<ol>
<li>To show your featured image in your single posts and/or pages:
<p style="padding-left: 60px;">in these files: <em>&#8220;<strong>content-single.php</strong>&#8220;</em> (for posts) and <em>&#8220;<strong>content-page.php</strong>&#8220;</em> (for pages), move or insert this code <strong>&#8216;thumbnail&#8217; =&gt; theme_get_post_thumbnail(array(),</strong> between <strong>&#8216;before&#8217; =&gt; theme_get_metadata_icons(&#8216;edit&#8217;, &#8216;header&#8217;),</strong> and <strong>&#8216;content&#8217; =&gt; theme_get_content(),</strong></p>
</li>
<li>If you want to size the featured images to be larger than the thumbnails, instead of <strong> </strong><strong>&#8216;thumbnail&#8217; =&gt; theme_get_post_thumbnail(array(), </strong>use this code:
<p style="padding-left: 60px;"><strong>&#8216;thumbnail&#8217; =&gt; theme_get_post_thumbnail(array(&#8220;size&#8221; =&gt; array(600, 300))), </strong></p>
<p>changing the sizes to the sizes of your choice (here, 600 is the width in pixels, and 300 is the height)</p>
</li>
<li>If you want to move the default location of the thumbnails in the blog list views from above/beside the post title and header metadata to below them:
<p style="padding-left: 60px;">in this file: <em>&#8220;<strong>library/wrappers.php</strong>&#8220;</em> move <strong>echo $thumbnail;</strong> to between <strong>echo $before; </strong>and <strong>?&gt;</strong></p>
</li>
<li>If you want your featured images and post thumbnails to be aligned right instead of left:
<p style="padding-left: 60px;">in <em><strong>&#8220;style.css&#8221;</strong></em> find: <strong>div.avatar{  position:relative;  margin: 0 5px;  border: 1px solid #aaa;  padding: 1px;  background: #fff;  float:left;} </strong>and change the float from left to right.  Warning: this may also change the float of your comment avatars; I can&#8217;t really say, so proceed with caution.</p>
</li>
<li>Then, on your site, under <em><strong>Dashboard &gt; Appearance &gt; Theme Options</strong></em>, under <strong>Featured Image, </strong>set:
<p style="padding-left: 60px;">Use featured image as thumbnail    </p>
<input id="theme_metadata_use_featured_image_as_thumbnail" checked="checked" name="theme_metadata_use_featured_image_as_thumbnail" type="checkbox" value="1" /> Yes</p>
<p style="padding-left: 60px;">Use auto thumbnails    </p>
<input id="theme_metadata_thumbnail_auto" name="theme_metadata_thumbnail_auto" type="checkbox" value="1" /> Generate post thumbnails automatically (use the first image from the post gallery)</p>
</li>
</ol>
<p>Your code and style in these files may be slightly different than mine, so adjust accordingly.</p>
<p>&nbsp;</p>
<p>Hope this works for you&#8230;and now I&#8217;ve got it all listed conveniently in one place until the code changes yet again&#8230;</p>
<p>Plus, for reference purposes, here are a couple of posts in the WordPress Codex explaining the use and purposes of the <a title="Post thumbnails in WordPress Codex" href="http://codex.wordpress.org/Post_Thumbnails" target="_blank">Post Thumbnail</a> and <a title="Linking to Post or Larger Image in WordPress Codex" href="http://codex.wordpress.org/Function_Reference/the_post_thumbnail#Examples" target="_blank">Linking to Post or Larger Image</a>.</p>
<div id="wpcr_respond_1"><div id="wpcr_hcard_h" class="vcard"><a class="url fn org" href="http://marilynfenndesign.com/">Artist as Designer: Marilyn Fenn Design</a><br /><span class="adr"><span class="country-name">USA</span>&nbsp;</span><a class="email" href="mailto:marilyn@marilynfenndesign.com">marilyn@marilynfenndesign.com</a></div></div><p>Related posts:<ol>
<li><a href='http://marilynfenndesign.com/designing-your-own-templates-for-wordpress-part-i/' rel='bookmark' title='Designing Your Own Theme for WordPress, part I'>Designing Your Own Theme for WordPress, part I</a></li>
<li><a href='http://marilynfenndesign.com/top-20-wordpress-plugins-for-a-complex-site/' rel='bookmark' title='Top 20 WordPress Plugins for a Complex Site'>Top 20 WordPress Plugins for a Complex Site</a></li>
<li><a href='http://marilynfenndesign.com/photoshop-tip-using-actions-to-resize-images/' rel='bookmark' title='PhotoShop Tip: Using Actions to Resize Images'>PhotoShop Tip: Using Actions to Resize Images</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://marilynfenndesign.com/using-featured-images-in-wordpress-websites/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

