<?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>Fearless Flyer Web Design &#187; Blog</title>
	<atom:link href="http://fearlessflyer.com/tag/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://fearlessflyer.com</link>
	<description>Fearless flyer is a blog that focuses on the latest topics of web design. This includes Wordpress, SEO, Photoshop, jQuery, PHP and CSS. Fearless flyer is owned and operated by Michael Soriano, a seasoned web developer living in Southern California.</description>
	<lastBuildDate>Fri, 03 Feb 2012 17:11:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Updated WP Theme: Aparatus Version 2</title>
		<link>http://fearlessflyer.com/2011/03/updated-wp-theme-aparatus-version-2/</link>
		<comments>http://fearlessflyer.com/2011/03/updated-wp-theme-aparatus-version-2/#comments</comments>
		<pubDate>Sun, 13 Mar 2011 05:31:26 +0000</pubDate>
		<dc:creator>michael soriano</dc:creator>
				<category><![CDATA[Freebies]]></category>
		<category><![CDATA[Wordpress Themes]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[clean]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Magazine Style]]></category>
		<category><![CDATA[Options]]></category>
		<category><![CDATA[premium theme]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[WP]]></category>
		<category><![CDATA[WP Themes]]></category>

		<guid isPermaLink="false">http://fearlessflyer.com/?p=2102</guid>
		<description><![CDATA[Aparatus has been my most popular freebie since I’ve started this blog. It’s complimented many WordPress sites and I’m very happy to have created it. This time around I’ve decided to upgrade this old puppy and refresh its’ looks just a tad bit. Aparatus version 2 is now available for download &#8211; for a low ]]></description>
			<content:encoded><![CDATA[<p>Aparatus has been my most popular freebie since I’ve started this blog. It’s complimented many WordPress sites and I’m very happy to have created it. This time around I’ve decided to upgrade this old puppy and refresh its’ looks just a tad bit. Aparatus version 2 is now available for <strong><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&#038;hosted_button_id=3FLDHUA9FZGPN">download</a></strong> &#8211; for a low fee of $10. </p>
<table>
<tr>
<td>
<div class="viewdemo"><a href="http://aparatus.fearlessflyer.com">View Demo</a></div>
</td>
<td style="padding-left:10px;">
<div class="buylink"><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&#038;hosted_button_id=3FLDHUA9FZGPN">Buy Through Paypal</a></div>
</td>
</tr>
</table>
<div class="special">Update &#8211; there has been a security vulnerability in an image handling script in this theme. Please update to the new <a href="http://code.google.com/p/timthumb/source/browse/trunk/timthumb.php">Timthumb</a>. Read more details <a href="http://fearlessflyer.com/2011/08/updated-themes-to-the-latest-timthumb-please-reinstall/">here</a>. </div>
<h3>So what has Changed?</h3>
<p>As you see from the demo, I’ve tried to preserve Aparatus’ original design. The few things that I changed is more for  performance rather than visual.  I went ahead and removed the Tweetmeme buttons in the archive pages – which greatly improved page loads. There was a horizontal scroll bar bug in the old version – which is now fixed. </p>
<p><a href="http://aparatus.fearlessflyer.com/"><img src="http://fearlessflyer.com/main/wp-content/uploads/2011/03/aparatus.jpg" alt="aparatus Updated WP Theme: Aparatus Version 2" title="click to demo aparatus" width="576" height="1230" class="showtip size-full wp-image-2245" /></a></p>
<p>The theme still utilizes <a href="http://fearlessflyer.com/2009/10/cufonize-your-pages-how-to-add-cufon-to-your-web-design/">Cufon</a> – but only for select areas of the theme such as the Logo and the footer. The logo now has an etched and gradient look – which is a big enhancement. I also added some Google fonts – to the post and comments headings.  A few CSS 3 code is also used to improve the presentation of the text a little bit more.</p>
<p>A new post thumbnail handling code is used. Both feature images and custom fields still work, it just handles the resizing better. The feature image also appears in the single post page – this is something many users have requested for.</p>
<p>The theme now supports the new WordPress menu system. You can now customize the menu according to your craziest &#8220;navi-wishes&#8221;.</p>
<p>Lastly, a smarter theme options is integrated. If you don’t enter a Twitter account – no button or feed will show in the theme. The same goes for the large ad button.  </p>
<h3>How to Use:</h3>
<p>Installing the theme is just like any other WordPress theme. Simply go to the &#8220;<strong>Appearance</strong>&#8221; > &#8220;<strong>Install Themes</strong>&#8221; section in your admin panel. Click the &#8220;<strong>Upload</strong>&#8221; link &#8211; browse to the theme .zip file and &#8220;<strong>Install Now</strong>&#8220;. </p>
<h6>Adding Post Thumbnails to your Posts:</h6>
<p>To add images to your posts you can use the Post Thumbnail feature of WordPress. Simply go to the post in &#8220;<strong>Edit</strong>&#8221; mode. On the right side of the page &#8211; click on &#8220;<strong>Set Featured Image</strong>&#8220;:</p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2011/09/set-as-featured-image.jpg" alt="set as featured image Updated WP Theme: Aparatus Version 2" title="set-as-featured-image" width="412" height="370" class="alignnone work size-full wp-image-2292" /></p>
<p>This will trigger the image uploader. Upload your image and as soon as that&#8217;s done, click the &#8220;<strong>Use as Featured Image</strong>&#8221; link:</p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2011/09/uset-as-featured-image.jpg" alt="uset as featured image Updated WP Theme: Aparatus Version 2" title="uset-as-featured-image" width="412" height="370" class="alignnone work size-full wp-image-2293" /></p>
<p>Note that you should keep the file sizes to a smaller size. The resizing script has a maximum size limit. </p>
<h6>How to Use the Slideshow:</h6>
<p>The slideshow automatically pulls your most recent posts (5 maximum). You can change this to pull from a specific category by going to &#8220;<strong>Appearance</strong>&#8221; > &#8220;<strong>Aparatus Options</strong>&#8221; and putting the category slug in the field: &#8220;<strong>Category Name for the Content Slider</strong>&#8220;. You can also take out the slideshow or choose to not automatically slide &#8211; by checking the appropriate boxes in the theme options. </p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2011/03/slideshow-options.jpg" alt="slideshow options Updated WP Theme: Aparatus Version 2" title="slideshow-options" width="412" height="370" class="alignnone work size-full wp-image-2303" /></p>
<p>Also, if you see the slider with the &#8220;<em>Oops&#8230;Looks like</em>&#8221; message (shown below) &#8211; that means you haven&#8217;t assigned a post thumbnail to your post. Read the section above called &#8220;<em>Adding Post Thumbnails to your Posts</em>&#8220;. </p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2011/03/aparatus-slider.jpg" alt="aparatus slider Updated WP Theme: Aparatus Version 2" title="aparatus-slider" width="412" height="370" class="alignnone size-full wp-image-2304" /></p>
<h6>How to insert a Photo Gallery:</h6>
<p>Adding a photo gallery into Aparatus is as easy as pie. Simply go to the post / page you want in &#8220;<strong>Edit</strong>&#8221; mode and click on the image uploader. Navigate to your local directory and highlight the images you want and click &#8220;<strong>Open</strong>&#8220;. </p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2011/09/insert-gallery.jpg" alt="insert gallery Updated WP Theme: Aparatus Version 2" title="insert gallery" width="412" height="370" class="alignnone work size-full wp-image-2297" /></p>
<p>As soon as the images upload, click on &#8220;<strong>Save Changes</strong>&#8221; and additional settings will show. Select your options and click &#8220;<strong>Insert Gallery</strong>&#8220;. </p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2011/09/insert-gallery2.jpg" alt="insert gallery2 Updated WP Theme: Aparatus Version 2" title="insert gallery" width="412" height="370" class="alignnone work size-full wp-image-2297" /></p>
<p>Update your post / page and preview it. You should see your gallery in place. </p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2011/03/aparatus-gallery.jpg" alt="aparatus gallery Updated WP Theme: Aparatus Version 2" title="aparatus-gallery" width="412" height="370" class="alignnone work size-full wp-image-2305" /></p>
<h6>How to Customize the Navigation Menu:</h6>
<p>Go to &#8220;<strong>Appearance</strong>&#8221; > &#8220;<strong>Menus</strong>&#8221; and start by creating a new menu. Enter a menu name and click &#8220;<strong>Create</strong>&#8220;.</p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2011/05/create-menu.jpg" alt="create menu Updated WP Theme: Aparatus Version 2" title="create-menu" width="412" height="370" class="alignnone work size-full wp-image-2301" /></p>
<p>This will create a blank menu panel in the right side of the page. The idea is to select categories, pages or custom links from the left side, click the &#8220;<strong>Add to Menu</strong>&#8221; button &#8211; and it will appear on the menu panel in the right. In this panel, you can drag and drop the links so you can design the menu hierarchy. Links that are staggered underneath become the drop down links from the respective parent &#8211; you get the drift. </p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2011/05/menu-system.jpg" alt="menu system Updated WP Theme: Aparatus Version 2" title="menu-system" width="412" height="370" class="alignnone work size-full wp-image-2302" /></p>
<p>Once the menu is done &#8211; hit &#8220;<strong>Save Menu</strong>&#8221; and in the top most left column box called &#8220;<strong>Theme Locations</strong>&#8220;, select the menu you just created from the drop down called &#8220;Header Menu&#8221;. Click &#8220;<strong>Save</strong>&#8221; and view your website. You menu should now be in place.</p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2011/03/aparatus-menu.jpg" alt="aparatus menu Updated WP Theme: Aparatus Version 2" title="aparatus-menu" width="412" height="370" class="alignnone work size-full wp-image-2306" /></p>
<h6>Switching Stylesheets</h6>
<p>Aparatus comes with 4 different color styles &#8211; also known as stylesheets. Go to &#8220;Appearance&#8221; > &#8220;Aparatus Options&#8221; and in the top most section is a drop down called &#8220;Style Sheet&#8221;. Select Maroon, Black, Blue or Green and &#8220;<strong>Save Changes</strong>&#8220;. </p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2011/03/stylesheet-select.jpg" alt="stylesheet select Updated WP Theme: Aparatus Version 2" title="stylesheet-select" width="412" height="370" class="alignnone work size-full wp-image-2307" /></p>
<h6>Adding the Twitter Badge and Latest Tweet:</h6>
<p>Still in the theme options, right underneath the Style Sheet drop down, is the Twitter account field. Enter your Twitter user name in this field. </p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2011/03/twitter-account.jpg" alt="twitter account Updated WP Theme: Aparatus Version 2" title="twitter-account" width="412" height="370" class="alignnone work size-full wp-image-2308" /></p>
<p>Save your changes and view your website. You should see a nice Twitter Badge in the Header &#8211; and your latest Tweet in the sidebar area. </p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2011/03/twitter-badge.jpg" alt="twitter badge Updated WP Theme: Aparatus Version 2" title="twitter-badge" width="412" height="370" class="alignnone work size-full wp-image-2309" /></p>
<h6>Advertising Blocks:</h6>
<p>You can ad advertising blocks in the sidebar area right in the theme options. You can do 1 large 300 x 250, and 4 small 125 x 125 squares. Go to the theme options page &#8211; and see the &#8220;<strong>Advertising Blocks</strong>&#8221; area. Enter the image source of the ad (where the image is coming from), and the destination (where the link goes when the image is clicked). </p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2011/03/adblocks.jpg" alt="adblocks Updated WP Theme: Aparatus Version 2" title="adblocks" width="412" height="370" class="alignnone work size-full wp-image-2310" /></p>
<p>Save your changes and view your site. You should see the ad blocks in the sidebar nicely lined up:</p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2011/03/adblocks-live.jpg" alt="adblocks live Updated WP Theme: Aparatus Version 2" title="adblocks-live" width="412" height="370" class="alignnone work size-full wp-image-2311" /></p>
<h3>Frequently Asked Questions:</h3>
<p>I&#8217;ve gathered a several most asked questions in regards to Aparatus. Read below to see if your question is one of them. </p>
<h6>Modify the Twitter Badge Image</h6>
<p>Many want to modify the large Twitter Badge in the header. Please note that the font I’ve used in this badge is called – League Gothic, and you need to download that in your Fonts folder to twiddle the <strong><a href="http://fearlessflyer.com/downloads/twitter-btn.zip">.psd file</a></strong>. </p>
<h6>Slideshow is not showing images</h6>
<p>If you’re using custom fields – make sure you have GD library installed. You also have to make sure that the cache folder inside scripts (<em>themes/aparatus/scripts/cache</em>) is fully writeable.  In addition, you need to enter at least a couple of posts to kick start the slideshow. </p>
<h6>How To make posts in the slideshow appear below the slideshow</h6>
<p>By default posts inside the slideshow does not duplicate underneath – where the rest of the post are. Many like it this way – but some have asked how to make them show below as well. To do this look for this line of code inside gallery.php and delete it:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$saved_ids</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> get_the_ID<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h6>How to fill the Author Box Information</h6>
<p>The “<strong>About the Author</strong>” box right in the single posts page grabs information from your profile. Go to “Users” > “Your Profile”, under Biographical Info – enter your stuff there. </p>
<h6>The Header Text takes too long to convert into the logo</h6>
<p>Sometimes Cufon takes a bit of time to do its thing. Aparatus uses this to use your site name and automatically convert it into a decent looking logo. But sometimes – due to client browser constraints, it performs poorly. </p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2011/03/apa8.jpg" alt="apa8 Updated WP Theme: Aparatus Version 2" title="apa8" width="576" height="308" class="alignnone size-full wp-image-2104" /></p>
<p>For this issue it would probably best to use an image for your logo. If you really like how it looks with Cufon – just take a screenshot and convert the image into a jpeg and replace it inside the header.php.</p>
<h3>Conclusion:</h3>
<p>Enough of the FAQ! <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&#038;hosted_button_id=3FLDHUA9FZGPN">Download already</a>! I hope you enjoy this theme as much I&#8217;ve seen it in many blogs. If you want to visit the original release post, click <a href="http://fearlessflyer.com/2010/01/get-some-aparatus-free-theme-for-wordpress/">here</a>. Otherwise, leave your comments and questions below. Happy blogging!</p>
]]></content:encoded>
			<wfw:commentRss>http://fearlessflyer.com/2011/03/updated-wp-theme-aparatus-version-2/feed/</wfw:commentRss>
		<slash:comments>319</slash:comments>
		</item>
		<item>
		<title>Elegant Themes &#8211; Best Value Themes Club</title>
		<link>http://fearlessflyer.com/2009/12/elegant-themes-best-value-themes-club/</link>
		<comments>http://fearlessflyer.com/2009/12/elegant-themes-best-value-themes-club/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 19:45:05 +0000</pubDate>
		<dc:creator>michael soriano</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[WP Themes]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Blogger]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[grunge]]></category>
		<category><![CDATA[premium theme]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[WP]]></category>

		<guid isPermaLink="false">http://fearlessflyer.com/?p=1080</guid>
		<description><![CDATA[With the increasing popularity of WordPress comes the business of developing &#8220;bi-products&#8221; that support this amazing blogging platform. This includes the countless plugins, web hosting, developer support and of course &#8211; the most marketable of them all: premium themes. A number of leading designers have already dominated this WordPress premium themes market; quite notably: Woothemes, ]]></description>
			<content:encoded><![CDATA[<p>With the increasing popularity of WordPress comes the business of developing &#8220;bi-products&#8221; that support this amazing blogging platform. This includes the countless plugins, web hosting, developer support and of course &#8211; the most marketable of them all: premium themes. </p>
<p>A number of leading designers have already dominated this WordPress premium themes market; quite notably: <a href="http://fearlessflyer.com/u/woothemes">Woothemes</a>, <a href="http://themereviewer.net/u/l">DIYThemes</a> and <a href="http://www.studiopress.com/">StudioPress</a>. </p>
<p>But amongst these big names you may have come across a more succinct, straightforward and classy premium theme designer &#8211; simply named &#8220;<a href="http://fearlessflyer.com/u/elegantthemes">Elegant Themes</a>&#8220;. </p>
<h3>Who is Elegant Themes?</h3>
<p>Elegant Themes is owned by a designer named <a href="http://twitter.com/elegantthemes">Nick Roach</a>. This means that all of the designs and code that is produced from Elegant Themes is from this mighty fellow. According to Nick: </p>
<blockquote><p>I created this website to provide WordPress themes of quality and integrity. I craft my themes with a goal of simplicity and professionalism and strive to inject each design with a dose of modest elegance. I believe that your website is not just a tool, it is an integral part of your identity. My job is to respect each customer by providing attractive and userfriendly templates that will help you achieve your online goals.</p></blockquote>
<h3>What&#8217;s so special about Elegant Themes?</h3>
<p><strong>Quality over quantity. </strong> Elegant Themes is hardly a large collection &#8211; I mean, there&#8217;s only about 30 downloadable themes at the time of this writing. But note they are quite high quality. Check out some of them below: </p>
<p><strong><a href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=147&#038;keyword=wooden&#038;custom=97">Wooden</a></strong></p>
<p>Very down to earth, classy and professionally done &#8211; this theme can transform your blog into a modern website wonder.<br />
<a href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=147&#038;keyword=wooden&#038;custom=97"><img src="http://fearlessflyer.com/main/wp-content/uploads/2009/12/wooden.jpg" alt="wooden Elegant Themes   Best Value Themes Club" title="Wooden By Elegant Themes" width="576" height="323" class="alignnone size-full wp-image-1101" /></a></p>
<p><strong><a href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=147&#038;keyword=lumin&#038;custom=96">Lumin</a></strong></p>
<p>Soothing to the eye with subtle textures and sharp, detailed accents &#8211; this theme is packed with visual amenities that scream <strong>WEB 2.0</strong>!<br />
<a href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=147&#038;keyword=lumin&#038;custom=96"><img src="http://fearlessflyer.com/main/wp-content/uploads/2009/12/lumin.jpg" alt="lumin Elegant Themes   Best Value Themes Club" title="Lumin by Elegant Themes" width="576" height="323" class="alignnone size-full wp-image-1100" /></a></p>
<p><strong><a href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=147&#038;keyword=grungemag&#038;custom=98">GrungeMag</a></strong></p>
<p>Semi-magazine, semi-newspaper &#8211; beautiful textures, slider, thumbnails &#8211; simply stunning.<br />
<a href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=147&#038;keyword=grungemag&#038;custom=98"><br />
<img src="http://fearlessflyer.com/main/wp-content/uploads/2009/12/grungemag.jpg" alt="grungemag Elegant Themes   Best Value Themes Club" title="Grungemag by Elegant Themes" width="576" height="323" class="alignnone size-full wp-image-1099" /></a></p>
<p><strong><a href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=147&#038;keyword=evid&#038;custom=99">Evid</a></strong></p>
<p>Create your own “<strong>Hulu</strong>” styled video website with this theme:<br />
<a href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=147&#038;keyword=evid&#038;custom=99"><br />
<img src="http://fearlessflyer.com/main/wp-content/uploads/2009/12/evid.jpg" alt="evid Elegant Themes   Best Value Themes Club" title="Evid by Elegant Themes" width="576" height="323" class="alignnone size-full wp-image-1098" /><br />
</a></p>
<p><strong><a href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=147&#038;keyword=deviant&#038;custom=100">Deviant</a></strong></p>
<p>The ultimate grunge look! Random page tears, crumpled paper, dirty textures &#8211; you want your blog to stand out from the crowd &#8211; this be the theme for you!<br />
<a href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=147&#038;keyword=deviant&#038;custom=100"><img src="http://fearlessflyer.com/main/wp-content/uploads/2009/12/deviant.jpg" alt="deviant Elegant Themes   Best Value Themes Club" title="Deviant by Elegant Themes" width="576" height="323" class="alignnone size-full wp-image-1096" /></a></p>
<p>Like Nick said &#8211; <em>&#8220;each design is injected with a dose of modest elegance&#8221;</em>. With each theme you will find excellent color schema, superb use of typography, plenty of textures, just the right amount of Javascript, and above all &#8211; originality. The themes obviously took time to build.</p>
<h3>You Can&#8217;t Beat 20 Bucks a Year!</h3>
<p>I don&#8217;t think I can elaborate on this any further. $20 dollars a year gives you unlimited access to all of Elegant Themes. Whether you’re a blog owner, an entrepreneur, or even a web developer &#8211; you’ve already won by having this arsenal of elegant designs to beautify your websites; all for about the same price as a bucket of fried chicken. <a href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=147&#038;keyword=join&#038;url=3">Head on over to Elegant Themes!</a></p>
<p>After choosing the theme you want to use, another important thing is to find  <a href="http://www.hostingobserver.com"><strong>cheap webhosting</strong></a> for your site. </p>
]]></content:encoded>
			<wfw:commentRss>http://fearlessflyer.com/2009/12/elegant-themes-best-value-themes-club/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Add a Style Switcher to your WordPress Theme</title>
		<link>http://fearlessflyer.com/2009/12/add-a-style-switcher-to-your-wordpress-theme/</link>
		<comments>http://fearlessflyer.com/2009/12/add-a-style-switcher-to-your-wordpress-theme/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 22:29:17 +0000</pubDate>
		<dc:creator>michael soriano</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WP Themes]]></category>
		<category><![CDATA[admin panel]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Options]]></category>
		<category><![CDATA[style switcher]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://fearlessflyer.com/?p=991</guid>
		<description><![CDATA[Whenever I download a WordPress theme there’s hardly ever a time that I leave it as is. Almost for sure &#8211; I will have to change some things to customize according to the site’s identity. For instance, maybe I’d want to match the heading styles to a company logo, or change the background colors to ]]></description>
			<content:encoded><![CDATA[<p>Whenever I download a WordPress theme there’s hardly ever a time that I leave it as is. Almost for sure &#8211; I will have to change some things to customize according to the site’s identity. For instance, maybe I’d want to match the heading styles to a company logo, or change the background colors to have the same schema or simply change the link styles to have a sharper look. Wouldn’t it be nice to have the ability to change all of this by switching style sheets from the theme options?</p>
<p>This tutorial will show you how to create a simple style switcher from your themes options panel. It will have a single drop down list with all the available styles to pick from. Once saved &#8211; your theme will switch to the selected style. Ready to get started &#8211; let’s begin:</p>
<h3>Part 1 – Set up functions.php</h3>
<p>First thing you need is a <strong>functions.php</strong> file. A functions file is an optional “plugin” type of file you can include in your theme directory folder.  One of its’ purpose is to setup administration options for your theme – which is exactly what we’re doing. Create a file and name it “<strong>functions.php</strong>” and paste the code below. Note that you need to change variables that define your theme name (<strong>$themename</strong>) and the short name (<strong>$shortname</strong>) to match your themes:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
&nbsp;
<span style="color: #000088;">$themename</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;My Sweet Theme&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$shortname</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;mst&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$options</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span> <span style="color: #009900;">&#40;</span>
<span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;name&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;Style Sheet&quot;</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">&quot;desc&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;Enter the Style Sheet you would like to use for Sweet Ass Theme&quot;</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">&quot;id&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$shortname</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;_style_sheet&quot;</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">&quot;type&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;select&quot;</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">&quot;options&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;default&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;green&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;blue&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;yellow&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> 
	<span style="color: #0000ff;">&quot;std&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;default&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>The above code initializes your theme options structure. First it defines several variables, including a multi-dimensional array (which will become our drop down list containing the four selectable options that will dictate our style sheets). Next is to copy the code below. This code loops through each iteration of the array we declared previously. It assigns a type of form field, displays labels and applies the correct descriptions etc. It also includes several functions that saves the form data, resets information and displays status messages etc. It&#8217;s a wee bit technical &#8211; so its better if we simply copy and paste the code.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">function</span> mytheme_add_admin<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$themename</span><span style="color: #339933;">,</span> <span style="color: #000088;">$shortname</span><span style="color: #339933;">,</span> <span style="color: #000088;">$options</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'page'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #990000;">basename</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'save'</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'action'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$options</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
update_option<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$options</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> update_option<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#93;</span>  <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> delete_option<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Location: themes.php?page=functions.php&amp;saved=true&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">die</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'reset'</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'action'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$options</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
delete_option<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Location: themes.php?page=functions.php&amp;reset=true&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">die</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
add_theme_page<span style="color: #009900;">&#40;</span><span style="color: #000088;">$themename</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; Options&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$themename</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; Options&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'edit_themes'</span><span style="color: #339933;">,</span> <span style="color: #990000;">basename</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'mytheme_admin'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> mytheme_admin<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$themename</span><span style="color: #339933;">,</span> <span style="color: #000088;">$shortname</span><span style="color: #339933;">,</span> <span style="color: #000088;">$options</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'saved'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;div id=&quot;message&quot; class=&quot;updated fade&quot;&gt;&lt;p&gt;&lt;strong&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$themename</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' settings saved.&lt;/strong&gt;&lt;/p&gt;&lt;/div&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'reset'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;div id=&quot;message&quot; class=&quot;updated fade&quot;&gt;&lt;p&gt;&lt;strong&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$themename</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' settings reset.&lt;/strong&gt;&lt;/p&gt;&lt;/div&gt;'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;div class=&quot;wrap&quot;&gt;
&lt;h2&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$themename</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> Settings&lt;/h2&gt;
&nbsp;
&lt;form method=&quot;post&quot;&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$options</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #b1b100;">switch</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'type'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">&quot;open&quot;</span><span style="color: #339933;">:</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;table width=&quot;100%&quot; border=&quot;0&quot; style=&quot;background-color:#eef5fb; padding:10px;&quot;&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">&quot;close&quot;</span><span style="color: #339933;">:</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&lt;/table&gt;&lt;br /&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">&quot;title&quot;</span><span style="color: #339933;">:</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;table width=&quot;100%&quot; border=&quot;0&quot; style=&quot;background-color:#dceefc; padding:5px 10px;&quot;&gt;&lt;tr&gt;
&lt;td valign=&quot;top&quot; colspan=&quot;2&quot;&gt;&lt;h3 style=&quot;font-family:Georgia,'Times New Roman',Times,serif;&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h3&gt;&lt;/td&gt;
&lt;/tr&gt;
&nbsp;
&lt;!--custom--&gt;
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span> 
<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">&quot;sub-title&quot;</span><span style="color: #339933;">:</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;h3 style=&quot;font-family:Georgia,'Times New Roman',Times,serif; padding-left:8px;&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h3&gt; 
&lt;!--end-of-custom--&gt;
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'text'</span><span style="color: #339933;">:</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&lt;tr&gt;
&lt;td valign=&quot;top&quot; width=&quot;20%&quot; rowspan=&quot;2&quot; valign=&quot;middle&quot;&gt;&lt;strong&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/strong&gt;&lt;/td&gt;
&lt;td width=&quot;80%&quot;&gt;&lt;input style=&quot;width:400px;&quot; name=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; id=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; type=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'type'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> get_settings<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">echo</span> get_settings<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</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;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'std'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;&lt;/td&gt;
&lt;/tr&gt;
&nbsp;
&lt;tr&gt;
&lt;td&gt;&lt;small&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'desc'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/small&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;margin-bottom:5px;border-bottom:1px dotted #000000;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'textarea'</span><span style="color: #339933;">:</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&lt;tr&gt;
&lt;td valign=&quot;top&quot; width=&quot;20%&quot; rowspan=&quot;2&quot; valign=&quot;middle&quot;&gt;&lt;strong&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/strong&gt;&lt;/td&gt;
&lt;td width=&quot;80%&quot;&gt;&lt;textarea name=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; style=&quot;width:400px; height:200px;&quot; type=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'type'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; cols=&quot;&quot; rows=&quot;&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> get_settings<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">echo</span> get_settings<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</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;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'std'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/textarea&gt;&lt;/td&gt;
&nbsp;
&lt;/tr&gt;
&nbsp;
&lt;tr&gt;
&lt;td&gt;&lt;small&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'desc'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/small&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;margin-bottom:5px;border-bottom:1px dotted #000000;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'select'</span><span style="color: #339933;">:</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;tr&gt;
&lt;td width=&quot;20%&quot; rowspan=&quot;2&quot; valign=&quot;middle&quot;&gt;&lt;strong&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/strong&gt;&lt;/td&gt;
&lt;td width=&quot;80%&quot;&gt;&lt;select style=&quot;width:240px;&quot; name=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; id=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</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;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'options'</span><span style="color: #009900;">&#93;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$option</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;option<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> get_settings<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$option</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">' selected=&quot;selected&quot;'</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$option</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'std'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">' selected=&quot;selected&quot;'</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$option</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/option&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;/select&gt;&lt;/td&gt;
&lt;/tr&gt;
&nbsp;
&lt;tr&gt;
&lt;td&gt;&lt;small&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'desc'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/small&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;margin-bottom:5px;border-bottom:1px dotted #000000;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">&quot;checkbox&quot;</span><span style="color: #339933;">:</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;tr&gt;
&lt;td width=&quot;20%&quot; rowspan=&quot;2&quot; valign=&quot;middle&quot;&gt;&lt;strong&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/strong&gt;&lt;/td&gt;
&lt;td width=&quot;80%&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>get_option<span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #000088;">$checked</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;checked=<span style="color: #000099; font-weight: bold;">\&quot;</span>checked<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</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: #000088;">$checked</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;input type=&quot;checkbox&quot; name=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; id=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; value=&quot;true&quot; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$checked</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> /&gt;
&lt;/td&gt;
&lt;/tr&gt;
&nbsp;
&lt;tr&gt;
&lt;td&gt;&lt;small&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'desc'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/small&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;margin-bottom:5px;border-bottom:1px dotted #000000;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&lt;p class=&quot;submit&quot;&gt;
&lt;input name=&quot;save&quot; type=&quot;submit&quot; value=&quot;Save changes&quot; /&gt;
&lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;save&quot; /&gt;
&lt;/p&gt;
&lt;/form&gt;
&lt;form method=&quot;post&quot;&gt;
&lt;p class=&quot;submit&quot;&gt;
&lt;input name=&quot;reset&quot; type=&quot;submit&quot; value=&quot;Reset&quot; /&gt;
&lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;reset&quot; /&gt;
&lt;/p&gt;
&lt;/form&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'admin_menu'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'mytheme_add_admin'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Test out your theme options by going under the “<strong>Appearance</strong>” section &gt; “<strong>Your Theme Name Options</strong>” tab. You will see the drop down list with the selectors already in place. Once you hit “<strong>Save Changes</strong>” &#8211; it saves your data. While clicking “<strong>Reset</strong>” sets it back to the default selector. We also see nice status messages appear on top each time we update. </p>
<p><img class="alignnone size-full wp-image-998" title="Screenshot of the theme options page" src="http://fearlessflyer.com/main/wp-content/uploads/2009/12/style-sheet-switcher1.jpg" alt="style sheet switcher1 Add a Style Switcher to your Wordpress Theme" width="541" height="195" /></p>
<h3>Part 2 – Create the Style Sheets</h3>
<p>Create four .css files that correspond to the drop down list selections we defined in our functions.php. The names do not have to exactly match the selectors (but is wise to have some meaningful relation to the names). Save these four files in the root directory of your theme:</p>
<p><strong>style.css</strong> &#8211; this style sheet is for a black background page with white colored fonts.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* CSS Document */</span>
body <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#000000</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#FFFFFF</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p><strong>green.css</strong> &#8211; this style sheet is for a green background page with white colored fonts.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* CSS Document */</span>
body <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#3bae09</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#FFFFFF</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p><strong>blue.css</strong> &#8211; this style sheet is for a blue background page with white colored fonts.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* CSS Document */</span>
body <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#038aba</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#FFFFFF</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p><strong>yellow.css</strong> &#8211; this style sheet is for… you get the picture.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* CSS Document */</span>
body <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#f6f658</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#333333</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<h3>Part 3 – The Switch Statement</h3>
<p>Now that we have our options working in the back end, and we have our four style sheets sitting in the root folder waiting to be called, all we need now is a way to flip the style sheets in our header file.  We achieve this by using a standard switch statement. A <strong>switch statement</strong> in php is an alternative to the the “if…else” statement. It uses the case keyword which we use to match our selectors to execute a statement that calls the appropriate style sheet. In the default header.php file &#8211; look for the line of code below and delete it:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&lt;link rel=&quot;stylesheet&quot; href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'stylesheet_url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&gt;</pre></td></tr></table></div>

<p>This is the standard call for the default style.css file which we no longer need. Next, paste the code below inside your <strong>header.php</strong> file:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$options</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$options</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>get_settings<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">===</span> <span style="color: #009900; font-weight: bold;">FALSE</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'std'</span><span style="color: #009900;">&#93;</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: #000088;">$$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> get_settings<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000000; font-weight: bold;">?&gt;</span>			
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">switch</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$mst_style_sheet</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		 <span style="color: #b1b100;">case</span> <span style="color: #0000ff;">&quot;default&quot;</span><span style="color: #339933;">:</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
		&lt;link rel=&quot;stylesheet&quot; href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'stylesheet_url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&gt;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>	
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">case</span> <span style="color: #0000ff;">&quot;green&quot;</span><span style="color: #339933;">:</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
		&lt;link rel=&quot;stylesheet&quot; href=&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>/green.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&gt;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">case</span> <span style="color: #0000ff;">&quot;blue&quot;</span><span style="color: #339933;">:</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
		&lt;link rel=&quot;stylesheet&quot; href=&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>/blue.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&gt;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">case</span> <span style="color: #0000ff;">&quot;yellow&quot;</span><span style="color: #339933;">:</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
		&lt;link rel=&quot;stylesheet&quot; href=&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>/yellow.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&gt;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>	
	<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></td></tr></table></div>

<p>The above code is quite self explanatory. First it grabs whichever values we’ve stored in our theme options. Second &#8211; is the switch statement for our drop down list, followed by cases for each entry &#8211; with its unique statement calling the style sheets. </p>
<p>Now if you go back to your style switcher and select “<strong>blue</strong>” &#8211; your theme style should switch to blue &#8211; and so on and so forth. </p>
<p>You can have as many styles as you wish to integrate in your options. As well as the amount of customization in the actual .css files is completely up to you. You can download the source files from this <strong><a href="http://fearlessflyer.com/downloads/style-switcher.zip">link</a></strong> &#8211; simply add these files in your theme folder and change some values &#8211; and your theme will instantly have it’s own style switcher. </p>
]]></content:encoded>
			<wfw:commentRss>http://fearlessflyer.com/2009/12/add-a-style-switcher-to-your-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
		</item>
		<item>
		<title>Free PSD &#8211; Grunge Blog Layout</title>
		<link>http://fearlessflyer.com/2009/10/free-psd-grunge-blog-layout/</link>
		<comments>http://fearlessflyer.com/2009/10/free-psd-grunge-blog-layout/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 03:51:19 +0000</pubDate>
		<dc:creator>michael soriano</dc:creator>
				<category><![CDATA[Freebies]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[HTML and PSD]]></category>
		<category><![CDATA[Photoshop]]></category>
		<category><![CDATA[portfolio]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Blogger]]></category>
		<category><![CDATA[grunge]]></category>
		<category><![CDATA[PSD]]></category>
		<category><![CDATA[Random]]></category>
		<category><![CDATA[Typepad]]></category>
		<category><![CDATA[Watercolor]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://fearlessflyer.com/?p=819</guid>
		<description><![CDATA[Just in time for Halloween &#8211; I give you &#8220;Argyle&#8217;s Drudge&#8221;, a fully layered Photoshop file that can be the base design of your next blog. In time for Halloween because it does have that messy, random and scary feel to it &#8211; don&#8217;t you think? The design is wholly unexpected &#8211; colors of October ]]></description>
			<content:encoded><![CDATA[<p>Just in time for Halloween &#8211; I give you <strong>&#8220;Argyle&#8217;s Drudge&#8221;</strong>, a fully layered Photoshop file that can be the base design of your next blog. In time for Halloween because it does have that messy, random and scary feel to it &#8211; don&#8217;t you think? The design is wholly unexpected &#8211; colors of October Green, Blood Shine Red and Mildew Blue. Stacks of shadowed crumpled paper make up the main container with a sidebar &#8211; which is the common trend in personal blog layouts. </p>
<p><a href="http://fearlessflyer.com/main/wp-content/uploads/2009/10/argyles-drudge.jpg"><img src="http://fearlessflyer.com/main/wp-content/uploads/2009/10/grunge-1.jpg" alt="grunge 1 Free PSD   Grunge Blog Layout" title="Full Size Preview - Click to Enlarge" width="576" height="758" class="alignnone size-full wp-image-821" /></a></p>
<p>Argyle’s Drudge has a very narrow content area of only 746 pixels. I chose to stay away from the standard 960 grid design because I find that grunge layouts don’t seem to play well with it. Speaking of grid based design, find this <a href="http://fearlessflyer.com/2009/10/taming-the-grid-align-your-wordpress-posts-perfectly-using-php-and-css/">article</a> about lining up your posts perfectly within the grid. As I was saying &#8211; the whole point of grunge is random and spontaneous &#8211; conforming to a grid just doesn’t fit. </p>
<h3>More Details:</h3>
<p>The pale blue watercolor splash background is courtesy of my <a href="http://backgrounds.mysitemyway.com/free-background-image/29/website-wallpaper-id/20/style-id/1/watercolor-grunge/pale-blue-pine/">Backgrounds etc</a>. The beautiful hand sketched fonts is known as <strong>“Fail Font”</strong> and can be downloaded from <a href="http://www.dafont.com/fail.font">DaFont.com</a>. Note that since “Fail Font” is free &#8211; it’s the perfect opportunity to use Cufon in your coding. Cufon is the technology that enables you to use any kind of font in your pages (<a href="http://fearlessflyer.com/2009/10/cufonize-your-pages-how-to-add-cufon-to-your-web-design/">read article</a>). </p>
<p>Argyle’s Drudge is completely free to use for your next theme of choice. May it be WordPress, Blogger, Typepad: all I ask in return is for you to follow my updates in <a href="http://twitter.com/mks6804">Twitter</a> or leave a comment below. </p>
<p><strong>Download <a href="http://fearlessflyer.com/downloads/argyles-drudge.zip">Argyles Drudge</a>.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://fearlessflyer.com/2009/10/free-psd-grunge-blog-layout/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Free WP Theme &#8211; The Garamond</title>
		<link>http://fearlessflyer.com/2009/05/free-wp-theme-the-garamond/</link>
		<comments>http://fearlessflyer.com/2009/05/free-wp-theme-the-garamond/#comments</comments>
		<pubDate>Fri, 15 May 2009 23:21:16 +0000</pubDate>
		<dc:creator>michael soriano</dc:creator>
				<category><![CDATA[Freebies]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Wordpress Themes]]></category>
		<category><![CDATA[WP Themes]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Blogger]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[premium theme]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[the grid]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[WP]]></category>

		<guid isPermaLink="false">http://fearlessflyer.com/?p=497</guid>
		<description><![CDATA[Just got done experimenting with a theme. This time &#8211; no photoshop mockups are done; went ahead and dove right in coding. I ended up with a simple, non-graphic intensive theme. Named it after one of my all time favorite fonts &#8211; the Garamond. Update &#8211; there has been a security vulnerability in an image ]]></description>
			<content:encoded><![CDATA[<p>Just got done experimenting with a theme. This time &#8211; no photoshop mockups are done; went ahead and dove right in coding. I ended up with a simple, non-graphic intensive theme. Named it after one of my all time favorite fonts &#8211; the <strong>Garamond</strong>. </p>
<div class="special">Update &#8211; there has been a security vulnerability in an image handling script in this theme. Please update to the new <a href="http://code.google.com/p/timthumb/source/browse/trunk/timthumb.php">Timthumb</a>. Read more details <a href="http://fearlessflyer.com/2011/08/updated-themes-to-the-latest-timthumb-please-reinstall/">here</a>.</div>
<div class="viewdemo"><a href="http://garamond.fearlessflyer.com">View the Demo</a></div>
<h3>The Home Page</h3>
<p>The Garamond&#8217;s home page mimicks a magazine layout. This was made possible without any special wordpress queries, nor does it filter by categories. Instead, the latest post is automatically styled different. Thanks to this neat trick by <a href="http://www.ruhanirabin.com/how-to-style-the-latest-post-in-wordpress/?dsq=9376478#comment-9376478">Ruhani Rabin</a>. The feature image and the thumbnails are automatically resized upon client request. Meaning, you can upload any size image (preferably wider than 540 pixels &#8211; which is the size of the container), assign it to a custom field &#8211; and voila! Images are cropped, zoomed and sharpened when once the browser hits it. The code I used is from Darren Hoyt known as <a href="http://www.darrenhoyt.com/2008/04/02/timthumb-php-script-released/">TimThumb</a>. </p>
<h3>The Inner Pages</h3>
<p>The Garamond is a bloggers theme. Traditional templates are intact: search, archive, category etc. I also included an authors bio at the end of each single post, as well as an author template which grabs all their articles. I went a little overboard in styling the subheadings for the post (shown below). The default font family used is of course &#8211; Garamond; although since it is not a standard font &#8211; Georgia is used as back up. The contrast between the larger text and the tiny Verdana is striking &#8211; which I felt was good. </p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2009/05/garamond-detaill.jpg" alt="garamond detaill Free WP Theme   The Garamond" title="garamond-detaill" width="576" height="500" class="alignnone size-full wp-image-498" /></p>
<h3>Other Features</h3>
<p>The two sidebars and the footer are all widget driven. Comments support Gravatars, pagination as well as multi-level threads. I&#8217;ve also added a random quote container right below the header &#8211; which requires the <a href="http://www.italyisfalling.com/stray-random-quotes/">Stray Quotes</a> plugin by Italyisfalling.com<br />
<br/><br />
You can view the demo from this <a href="http://garamond.fearlessflyer.com/">link</a>, or <strong>download directly from <a href="http://fearlessflyer.com/downloads/the-garamond.zip">here</a>.</strong> All I ask is for you leave a comment below &#8211; or follow my updates via <strong><a href="http://twitter.com/_fearlessflyer">twitter</a></strong>. </p>
]]></content:encoded>
			<wfw:commentRss>http://fearlessflyer.com/2009/05/free-wp-theme-the-garamond/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>How to change the Background Dynamically in your WordPress Theme</title>
		<link>http://fearlessflyer.com/2009/05/how-to-change-the-background-dynamically-in-your-wordpress-theme/</link>
		<comments>http://fearlessflyer.com/2009/05/how-to-change-the-background-dynamically-in-your-wordpress-theme/#comments</comments>
		<pubDate>Sat, 09 May 2009 19:01:44 +0000</pubDate>
		<dc:creator>michael soriano</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[WP]]></category>
		<category><![CDATA[WP Themes]]></category>

		<guid isPermaLink="false">http://fearlessflyer.com/?p=486</guid>
		<description><![CDATA[We all have seen WordPress sites with repeating backgrounds that span beautifully across the entire page. This property is usually applied in the body tag of your template. What about those portfolio websites that use a different background image in the front page? Or those magazine styled websites that apply different backgrounds for their category ]]></description>
			<content:encoded><![CDATA[<p>We all have seen WordPress sites with repeating backgrounds that span beautifully across the entire page. This property is usually applied in the body tag of your template.  What about those portfolio websites that use a different background image in the front page? Or those magazine styled websites that apply different backgrounds for their category pages? How’d they do that? </p>
<h3>The problem</h3>
<p>For anyone who’s developed a WordPress theme would know how to break it up in templates: header.php, sidebar.php , footer.php etc. And as I’ve mentioned: you control the background image (if you want it to span the entire page) usually in the body tag of your HTML.  The problem is – the body tag comes BEFORE any other tag in your templates. </p>
<p>For example, take a look at the screenshot of a typical header.php file below. It shows the body tag where you apply a different property value in the CSS file each time you want it unique from another page:</p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2009/05/bg-tut1.jpg" alt="bg tut1 How to change the Background Dynamically in your Wordpress Theme" title="bg-tut1" width="576" height="200" class="alignnone size-full wp-image-488" /></p>
<p>The problem is, in your special template, you’ve already called the get header file:</p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2009/05/bg-tuts2.jpg" alt="bg tuts2 How to change the Background Dynamically in your Wordpress Theme" title="bg-tuts2" width="576" height="200" class="alignnone size-full wp-image-487" /></p>
<h3>The Answer – Conditional Tags</h3>
<p>WordPress is built is such a way that you can control almost every aspect of your pages. One useful snippet is known as Conditional Tags. Conditional tags can be used in your templates to change what is displayed on a particular page – like the background image. Examples of conditional tags are: is_single(), is_front_page() or is_admin(). For more information on Conditional Tags – see the this <a href="http://codex.wordpress.org/Conditional_Tags">link</a> from WordPress Codex library. In our case – we’re going to use the tag is_page_template().</p>
<h3>Step 1: Insert the PHP</h3>
<p>Open your header.php in your text editor. You’re going to add a conditional statement in inside the opening body id tag. In my case, I’m using three different backround images. Two of them, I want to apply in two individual templates, while the rest of the pages share a default image:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&lt;body id=&quot;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>is_page_template<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template-diff-bg-demo1.php'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
       <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;template-diff-bg-demo1&quot;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span> 
<span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span>is_page_template<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template-diff-bg-demo2.php'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
       <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;template-diff-bg-demo2&quot;</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: #0000ff;">&quot;default&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; &gt;</pre></td></tr></table></div>

<p><strong>Explanation:</strong> If the template used is named “template-diff-bg-demo1.php”, echo a body id of “template-diff-bg-demo1”, or if template used is named “template-diff-bg-demo2.php” use body id of “template-diff-bg-demo2”, otherwise – just use body id of “default”. </p>
<h3>Step 2: The CSS</h3>
<p>Open your styles.css. We’re going to match the body ids that are going to be called each time you switch page templates. In our case – we need three different ids: </p>
<ul>
<li>body# template-diff-bg-demo1 – a different background</li>
<li>body# template-diff-bg-demo2 – another background</li>
<li>body#default – the default background</li>
</ul>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">body<span style="color: #cc00cc;">#default</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">images/default-bg.jpg</span><span style="color: #00AA00;">&#41;</span> <span style="color: #000000; font-weight: bold;">top</span> <span style="color: #993333;">center</span> <span style="color: #993333;">no-repeat</span> <span style="color: #cc00cc;">#000000</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
body<span style="color: #cc00cc;">#template-diff-bg-demo1</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span>images/default-bg2.jpg<span style="color: #00AA00;">&#41;</span> <span style="color: #000000; font-weight: bold;">top</span> <span style="color: #993333;">center</span> <span style="color: #993333;">no-repeat</span> <span style="color: #cc00cc;">#000000</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
body<span style="color: #cc00cc;">#template-diff-bg-demo2</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span>images/default-bg3.jpg<span style="color: #00AA00;">&#41;</span> <span style="color: #000000; font-weight: bold;">top</span> <span style="color: #993333;">center</span> <span style="color: #993333;">no-repeat</span> <span style="color: #cc00cc;">#000000</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<h3>Conclusion </h3>
<p>There you have it. We dynamically changed the body ids of our theme – according to specific page templates. Changing the body ids allowed us style them differently in our stylesheet. This is just one of many possibilities in displaying content (or in our case – style) by using WordPress’ conditional tags. Check out the demo using the code above from this <a href="http://squid.fearlessflyer.com/page-2/">link</a>. Happy Coding!</p>
<p><a href="http://squid.fearlessflyer.com/page-2/"><img src="http://fearlessflyer.com/main/wp-content/uploads/2009/05/bg-tuts3.jpg" alt="bg tuts3 How to change the Background Dynamically in your Wordpress Theme" title="bg-tuts3" width="600" height="200" class="alignnone size-full wp-image-489" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://fearlessflyer.com/2009/05/how-to-change-the-background-dynamically-in-your-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
	</channel>
</rss>

<!-- Served from: fearlessflyer.com @ 2012-02-03 18:36:34 by W3 Total Cache -->
