<?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; Options</title> <atom:link href="http://fearlessflyer.com/tag/options/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>Tue, 07 Sep 2010 21:02:16 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>WordPress Theme &#8220;Monte Cristo” is now FREE!</title><link>http://fearlessflyer.com/2010/07/wp-theme-monte-cristo-is-now-free/</link> <comments>http://fearlessflyer.com/2010/07/wp-theme-monte-cristo-is-now-free/#comments</comments> <pubDate>Thu, 29 Jul 2010 03:29:34 +0000</pubDate> <dc:creator>michael soriano</dc:creator> <category><![CDATA[Freebies]]></category> <category><![CDATA[Wordpress Themes]]></category> <category><![CDATA[free psd]]></category> <category><![CDATA[free wordpress theme]]></category> <category><![CDATA[lightbox]]></category> <category><![CDATA[Options]]></category> <category><![CDATA[Slider]]></category> <category><![CDATA[WP Themes]]></category><guid isPermaLink="false">http://fearlessflyer.com/?p=1716</guid> <description><![CDATA[Alright, alright &#8211; what&#8217;s the story behind the silly name. Well one of my favorite movies is &#8220;V for Vendetta &#8220;, where the main character&#8217;s favorite movie is &#8220;The Count of Monte Cristo&#8220;. Both movies are classic tales of retribution and payback &#8211; which I love. Therefore, when I was coding the theme, I may [...]]]></description> <content:encoded><![CDATA[<p>Alright, alright &#8211; what&#8217;s the story behind the silly name. Well one of my favorite movies is &#8220;<em>V for Vendetta </em>&#8220;, where the main character&#8217;s favorite movie is &#8220;<em>The Count of Monte Cristo</em>&#8220;. Both movies are classic tales of retribution and payback &#8211; which I love. Therefore, when I was coding the theme, I may have taken a break, took out “<em>V for Vendetta</em>” and Voila!</p><div class="viewdemo"><a href="http://mc.fearlessflyer.com/">View the Demo</a></div><div class="special">Download the theme files from <strong><a href="http://fearlessflyer.com/downloads/monte-cristo.zip">here</a></strong>, and for those who wish to mess with the Photoshop file, get the PSD <strong><a href="http://fearlessflyer.com/downloads/monte-cristo-PSD.zip">here</a></strong>.</div><p>Let it be known that is is one of my older themes that I once had for sale in Themeforest.  It did quite well in the beginning. Although I noticed the decline in sales as time passed, therefore I decided to give it away for free.</p><h3>So what’s so special about it?</h3><p>Monte Cristo is clean, sharp and minimal. Yet the subtle graphic effects give it a bit of modernity and heightened class. I especially like this theme because it kind of reminds me of the older style of web pages – with the borders, and the “page-peel” effect (which was quite big a couple of years ago). It comes with an options page where you can tweak the slideshow settings, switch stylesheets etc.  It also comes with an alternate homepage template, as well as a “<em>portfolio</em>” page. Read my <a href="http://fearlessflyer.com/2009/09/meet-monte-cristo-your-friendly-wordpress-theme/">old sales pitch</a> page for more details.</p><p><img src="http://fearlessflyer.com/main/wp-content/uploads/2010/07/theportfolio-page.jpg" alt="" title="its an oldie but a goodie!" width="576" height="474" class="showtip size-full wp-image-1728" /></p><h3>Creative Commons Who?</h3><p>I’ve changed all my giveaways to have the <a href="http://creativecommons.org/licenses/by/3.0/">Attribution Type of Creative Commons licensing model</a>. What this means is that you can use the theme however you want – as long as you leave my credits in the footer. *But if you REALLY must take off the credits in the footer (i.e. you’re installing it for a client website): contact me – we may be able to work something out (hint: a small donation of some sort).</p><h3>Conclusion</h3><p>So go ahead, install Monte Cristo and have a blast. I’ve tested the theme to run on WP 3.0 and all major browsers. Also, make sure you read the &#8220;ReadMe.doc&#8221; file in the theme folder for additional instructions. Lastly, keep an eye out for more of my freebies. <strong>I shall be releasing more real soon</strong>!</p><p>Note: Since I created the theme almost a year ago, it doesn&#8217;t utilize the newer features of WordPress 3.0 such as post feature images, custom post types and custom menus.</p><div class="special"><strong>Update: </strong>You may have to install the theme manually by unzipping the file into the themes folder via ftp. I&#8217;m having problems trying to use the automatic install of the theme.</div> ]]></content:encoded> <wfw:commentRss>http://fearlessflyer.com/2010/07/wp-theme-monte-cristo-is-now-free/feed/</wfw:commentRss> <slash:comments>22</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" 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>15</slash:comments> </item> <item><title>Meet Monte Cristo &#8211; Your Friendly WordPress Theme</title><link>http://fearlessflyer.com/2009/09/meet-monte-cristo-your-friendly-wordpress-theme/</link> <comments>http://fearlessflyer.com/2009/09/meet-monte-cristo-your-friendly-wordpress-theme/#comments</comments> <pubDate>Fri, 18 Sep 2009 18:39:48 +0000</pubDate> <dc:creator>michael soriano</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[WP Themes]]></category> <category><![CDATA[Content Slider]]></category> <category><![CDATA[Monte Cristo]]></category> <category><![CDATA[Options]]></category> <category><![CDATA[premium theme]]></category> <category><![CDATA[Professional]]></category> <category><![CDATA[Slider]]></category> <category><![CDATA[ThemeForest]]></category><guid isPermaLink="false">http://fearlessflyer.com/?p=730</guid> <description><![CDATA[It seems that every website you see has some form of a slide show in the home page. So it plagued me for a while whether or not I should put one&#8230;like my three year old son would say: &#8220;what the heck&#8221; &#8211; so I did anyway. This is my newest WordPress theme Monte Cristo. [...]]]></description> <content:encoded><![CDATA[<p>It seems that every website you see has some form of a slide show in the home page. So it plagued me for a while whether or not I should put one&#8230;like my three year old son would say: &#8220;<em>what the heck</em>&#8221; &#8211; so I did anyway. This is my newest WordPress theme Monte Cristo. He has a dynamic slider, a zooming effect for all pictures, different color styles and a theme options panel in his back end (that didn&#8217;t sound right).</p><h3>Features</h3><p>The slider in the home page templates are dynamic. Meaning &#8211; they are actual posts in your blog that you set in a specified category (i.e. feature) &#8211; so they show up in the slider. You can set it to run automatically and are allowed up to eight slides. The slider uses CSSGlobe&#8217;s &#8220;<a href="http://cssglobe.com/post/4004/easy-slider-15-the-easiest-jquery-plugin-for-sliding">easy slider</a>&#8220;. All images that link to other images automatically loads &#8220;<a href="http://www.cabel.name/2008/02/fancyzoom-10.html">FancyZoom</a>&#8221; &#8211; which  which is the amazing javascript zooming effect you see in many modern websites. Monte Cristo also comes with four different &#8220;characters&#8221; or color schemes: <strong>Jacopo</strong> is the gray and burgundy guy, <strong>Danglars</strong> swaggers in brown and taupe,<strong> Mondego</strong> likes it purple and green while <strong>Dantes</strong> is different shades of blue.</p><p><img src="http://fearlessflyer.com/main/wp-content/uploads/2009/09/monte-cristo2.png" alt="monte-cristo2" title="The four characters of Monte Cristo - inspired by the movie" width="576" height="603" class="alignnone size-full wp-image-737" /></p><h3>Why Friendly?</h3><p>Monte Cristo has a built in options panel where you can set your preferences. Friendly because this way &#8211; you don&#8217;t have to know HTML, or Javascript to tweak the code. You can set which character you want from the options panel, set the slider categories, automatic or not, plugin your logo files &#8211; just about all that you need to customize Monte Cristo to fit your website.</p><h3>Why Buy?</h3><p>Monte Cristo is up on sale at <a href="http://themeforest.net/item/monte-cristo/59175?ref=mks6804">ThemeForest.net</a> for a measly $25.00. You can check out the live demo from this <a href="http://mc.fearlessflyer.com/">link</a>. Why buy if I have been giving away stuff for free? Oh I don&#8217;t know &#8211; maybe because since I spent a whole lot of time making this theme that I figured I might as well try to make money off of it. Maybe since I give away free support once you purchase is another reason. Or maybe if I make enough money from this that I can now spend more time with my son &#8211; teach him not to say bad words like &#8220;<em>what the heck</em>&#8220;. Of course, its completely up to you.</p><h3>Updated to Version 1.3 &#8211; Drop Down List Support for the Page Navigation!</h3><p>For those of you who have asked for a drop down list for sub pages &#8211; the update is here. I will be glad to send you the update files if you contact me. If you already have Monte Cristo running and have made some edits to the css files &#8211; contact me, and I will send you the code to paste in the css files.</p><p><img src="http://fearlessflyer.com/main/wp-content/uploads/2009/09/mc-update1.jpg" alt="" title="added drop down capability for the page navigation" width="576" height="300" class="alignnone size-full wp-image-1151" /></p><h3>Get the Updated Files Here!</h3><div class="actual-links"><strong><a href="http://fearlessflyer.com/downloads/Monte-Cristo-Update.zip">Monte-Cristo-Update.zip</a></strong> &#8211; This download IS NOT the whole theme! It only contains the files needed to convert the page navigation to support child pages in a drop down style menu: Header.php and the css files.</div> ]]></content:encoded> <wfw:commentRss>http://fearlessflyer.com/2009/09/meet-monte-cristo-your-friendly-wordpress-theme/feed/</wfw:commentRss> <slash:comments>15</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)

Served from: fearlessflyer.com @ 2010-09-09 10:55:38 -->