<?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>Matt Hodder &#187; Thesis Skins</title>
	<atom:link href="http://www.matthodder.com/category/thesis-skins/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.matthodder.com</link>
	<description>Freelance Web Design, Thesis Skins, and Wordpress &#38; Thesis Design</description>
	<lastBuildDate>Mon, 19 Jul 2010 16:06:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>New Thesis Skins</title>
		<link>http://www.matthodder.com/new-thesis-skins/</link>
		<comments>http://www.matthodder.com/new-thesis-skins/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 22:54:25 +0000</pubDate>
		<dc:creator>Matt Hodder</dc:creator>
				<category><![CDATA[Thesis Skins]]></category>
		<category><![CDATA[thesisfolio]]></category>
		<category><![CDATA[thesisplay]]></category>

		<guid isPermaLink="false">http://www.matthodder.com/?p=513</guid>
		<description><![CDATA[I thought I&#8217;d keep everyone updated here about my latest Thesis skins, as that&#8217;s what most people end up here for anyways. So read on about my latest skins and a sweet coupon code! ThesisFolio ThesisFolio is my latest skin and I have to say I&#8217;m pretty proud of it.  The new skin comes standard with [...]]]></description>
			<content:encoded><![CDATA[<p><a class="post_image_link" href="http://www.matthodder.com/new-thesis-skins/" title="Permanent link to New Thesis Skins"><img class="post_image aligncenter frame" src="http://matthodder.com/wp-content/uploads/2010/07/post.jpg" width="540" height="100" alt="Post image for New Thesis Skins" /></a>
</p><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.matthodder.com%2Fnew-thesis-skins%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.matthodder.com%2Fnew-thesis-skins%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>I thought I&#8217;d keep everyone updated here about my latest Thesis skins, as that&#8217;s what most people end up here for anyways. So read on about my latest skins and a sweet coupon code!</p>
<h2>ThesisFolio</h2>
<p><a href="http://thesisthemes.com/premium-skins/thesisfolio/"><img class="alignleft size-full wp-image-514 frame" title="thesisfolio-small" src="http://174.121.151.58/~mthodder/wp-content/uploads/2010/07/thesisfolio-small.jpg" alt="" width="275" height="185" /></a> ThesisFolio is my latest skin and I have to say I&#8217;m pretty proud of it.  The new skin comes standard with new templates for both a custom homepage and custom portfolio pages, which allows you to create a great site in a matter of minutes. The new featured area provides the ability to showcase your portfolio items or blog posts along a big “sell” area for your services/products. The design is also rock solid and very appealing. Twelve themes and a colour picker give you unlimited options for design. The skin is meant for companies or individuals looking for a way to showcase their skills or products. View <a href="http://thesisthemes.com/premium-skins/thesisfolio/">more info and the demo here</a>.</p>
<p class="alert">Use coupon <strong>5957E65135</strong> and get $10 off ThesisFolio. Snag it quick though, as it&#8217;ll expire after the first 10 purchases!</p>
<h2>ThesisPlay</h2>
<p><a href="http://thesisthemes.com/premium-skins/thesisplay/"><img class="alignleft size-full wp-image-518 frame" title="thesisplay-small3" src="http://174.121.151.58/~mthodder/wp-content/uploads/2010/07/thesisplay-small3.jpg" alt="" width="275" height="185" /></a>ThesisPlay has been out for a while (on version 1.1 at time of typing) but I never officially announced it here. I still dig it, and of course it&#8217;s still being supported and updated continually. ThesisPlay is for people who are looking for something far from the conventional Thesis look. Hours were put into changing even the smallest detail to get a totally new, unique Thesis look unlike any other skin out there. It&#8217;s a great skin for people looking for a content-driven, social site. <a href="http://thesisthemes.com/premium-skins/thesisplay/">Check out all the details here</a>.</p>
<p class="alert">Use coupon <strong>CCDE12</strong> and get 20% off of ThesisPlay. This one doesn&#8217;t expire!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.matthodder.com/new-thesis-skins/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Add an options menu to the WordPress dashboard for a Thesis Skin</title>
		<link>http://www.matthodder.com/thesis-skins-add-an-options-menu-to-wordpress/</link>
		<comments>http://www.matthodder.com/thesis-skins-add-an-options-menu-to-wordpress/#comments</comments>
		<pubDate>Fri, 29 May 2009 21:09:52 +0000</pubDate>
		<dc:creator>Matt Hodder</dc:creator>
				<category><![CDATA[Thesis Skins]]></category>
		<category><![CDATA[thesis]]></category>
		<category><![CDATA[thesis skin]]></category>
		<category><![CDATA[thesis tutorial]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress dashboard]]></category>

		<guid isPermaLink="false">http://www.matthodder.com/?p=154</guid>
		<description><![CDATA[Lately I&#8217;ve been venturing into the Thesis community, coming across loads of great people and excellent resources. Although publicly released skins (both paid and free) seem to be taking off only as of lately, I&#8217;ve had a chance to try out a few free Thesis skins. Something I haven&#8217;t seen a Thesis skin tap into, [...]]]></description>
			<content:encoded><![CDATA[<p><a class="post_image_link" href="http://www.matthodder.com/thesis-skins-add-an-options-menu-to-wordpress/" title="Permanent link to Add an options menu to the WordPress dashboard for a Thesis Skin"><img class="post_image aligncenter frame" src="http://www.matthodder.com/wp-content/uploads/1.jpg" width="540" height="200" alt="Post image for Add an options menu to the WordPress dashboard for a Thesis Skin" /></a>
</p><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.matthodder.com%2Fthesis-skins-add-an-options-menu-to-wordpress%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.matthodder.com%2Fthesis-skins-add-an-options-menu-to-wordpress%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Lately I&#8217;ve been venturing into the Thesis community, coming across loads of great people and excellent resources. Although publicly released skins (both paid and free) seem to be taking off only as of lately, I&#8217;ve had a chance to try out a few free Thesis skins.</p>
<p>Something I haven&#8217;t seen a Thesis skin tap into, is theme options directly editable through the WordPress dashboard- despite its easy implementation. Let me show you how to accomplish this, starting with the source code complete with comments:</p>
<pre class="brush: php;">// NOTE: Hover top right to download! //

&lt;?php

add_action('admin_menu', 'thesis_custom_add_page'); // Moves the add page function in the WP dashboard admin menu via WP hook

function thesis_custom_add_page() { // Adds our test page to Thesis menu
add_theme_page('Test Page', 'Test Page', 'edit_themes', 'test-page', 'test_page_admin');
}

function test_page_admin() { // Our function (as seen above) that runs when the page is accessed

$tt_twitter_option = 'tt_twitter_name'; // Option name (in db)
$tt_hidden_field_name = 'tt_submit_hidden';
$tt_data_field_name = 'tt_twitter_field';

$tt_twitter_value = get_option($tt_twitter_option); // Read in existing option value from database

if( $_POST[ $tt_hidden_field_name ] == 'yes' ) { // If form has been sumbitted
$tt_twitter_value = $_POST[ $tt_data_field_name ]; // Read value from post
update_option($tt_twitter_option, $tt_twitter_value); // Save value in database

?&gt;
&lt;div class="updated"&gt;&lt;p&gt;&lt;strong&gt;&lt;?php _e('Your options have been saved.', 'mt_trans_domain' ); ?&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/div&gt;
&lt;?php

}
// Main screen:
echo '&lt;div class="wrap"&gt;';
echo "&lt;h2&gt;" . __( 'Thesis Themes - Customization', 'mt_trans_domain' ) . "&lt;/h2&gt;"; // header

?&gt;

&lt;form name="form1" method="post" action="&lt;?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?&gt;"&gt;
&lt;input type="hidden" name="&lt;?php echo $tt_hidden_field_name; ?&gt;" value="yes"&gt;
&lt;p&gt;&lt;?php _e("Enter your twitter username:", 'mt_trans_domain' ); ?&gt;
&lt;input type="text" name="&lt;?php echo $tt_data_field_name; ?&gt;" value="&lt;?php echo $tt_twitter_value; ?&gt;" size="25"&gt;
&lt;/p&gt;

&lt;p class="submit"&gt;
&lt;input type="submit" name="Submit" value="&lt;?php _e('Update Options', 'mt_trans_domain' ) ?&gt;" /&gt;
&lt;/p&gt;

&lt;/form&gt;
&lt;/div&gt;

&lt;?php

}</pre>
<h2>Where should I put the code?</h2>
<p>Well you should be using only a couple files to customize Thesis: custom.css and custom_functions.php. You can paste all of the source code directly into custom_functions.php.</p>
<h2>What does the code do?</h2>
<p>Right now, the code isn&#8217;t going to be any use to your front end. The code will create a new menu called &#8220;Test Page&#8221; under the appearance tab in your WordPress dashboard. Further, it will have a title, field, and submit button. The field will iniatily hold no value, but after you fill it in, it will be saved to the database. The value being saved is called &#8220;tt_twitter_name&#8221;, although you could rework the titles and have the value do anything. Lets take a closer look at the code.</p>
<pre class="brush: php;">add_action('admin_menu', 'thesis_custom_add_page');</pre>
<p>Thesis didn&#8217;t invent the hook. WordPress has a number of hooks throughout its code, both for the  backend and frontend. Basically, in this line of code, we are adding a custom function <strong>(thesis_custom_add_page) </strong>at the hook location of <strong>admin_menu. </strong>This will let our function run at the right location and time.</p>
<pre class="brush: php;">function thesis_custom_add_page() {
add_theme_page('Test Page', 'Test Page', 'edit_themes', 'test-page', 'test_page_admin');
}</pre>
<p>Here&#8217;s our function we looked at above. What is the function doing? Adding our theme ofcourse. The <strong>add_theme_page</strong> function runs like this: add_menu_page(<em>page_title</em>, <em>menu_title</em>, <em>access_level/capability</em>, <em>file</em>, <em>[function]</em>, <em>[icon_url]</em>);. We are adding a page title of &#8220;Test Page&#8221;, a menu title of &#8220;Test Page&#8221;, access rights of &#8220;edit_themes&#8221; (which means you must be able to edit themes to access this page), the file name, and the resulting function.</p>
<pre class="brush: php;">function test_page_admin() {

$tt_twitter_option = 'tt_twitter_name';
$tt_hidden_field_name = 'tt_submit_hidden';
$tt_data_field_name = 'tt_twitter_field';</pre>
<p>In this set of code we are opening our function that will run once the page is accessed <strong>(test_page_admin) </strong>and setting our variables. In this example we are going to get the user to input a Twitter username, so that we can access it later.</p>
<p><strong>$tt_twitter_option</strong> is our option name, and will hold our database field name (it&#8217;s up to you).</p>
<p><strong>$tt_hidden_field</strong>_<strong>name</strong> is simply the name of the hidden field in the html form that will load. It will be used to check whether the user had submitted form on load.</p>
<p><strong>$tt_data_field_name</strong> is the the name of our field, where the user will input his/her Twitter username.</p>
<pre class="brush: php;">$tt_twitter_value = get_option($tt_twitter_option);</pre>
<p>Here we have another variable, <strong>tt_twitter_value</strong>, which runs a WordPress function to get the value already present in the database (if it is there at all).</p>
<pre class="brush: php;">if( $_POST[ $tt_hidden_field_name ] == 'yes' ) {
$tt_twitter_value = $_POST[ $tt_data_field_name ];
update_option($tt_twitter_option, $tt_twitter_value);
?&gt;
&lt;div class="updated"&gt;&lt;p&gt;&lt;strong&gt;&lt;?php _e('Your options have been saved.', 'mt_trans_domain' ); ?&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/div&gt;
&lt;?php</pre>
<p>As mentioned before, we want to check if the user submitted the form already, and we do that by using the hidden field. If the hidden field is set to &#8220;yes&#8221; once accessed, we will run some of this code and show the user a message indicating options were saved. <strong>update_option(); </strong>is another wordpress function. It will update the database <strong>($tt_twitter_option) </strong>with the new value (<strong>$tt_twitter_value).</strong></p>
<pre class="brush: php;">echo '&lt;div class="wrap"&gt;';
echo "&lt;h2&gt;" . __( 'Thesis Themes - Customization', 'mt_trans_domain' ) . "&lt;/h2&gt;"; // header

?&gt;

&lt;form name="form1" method="post" action="&lt;?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?&gt;"&gt;
&lt;input type="hidden" name="&lt;?php echo $tt_hidden_field_name; ?&gt;" value="yes"&gt;
&lt;p&gt;&lt;?php _e("Enter your twitter username:", 'mt_trans_domain' ); ?&gt;
&lt;input type="text" name="&lt;?php echo $tt_data_field_name; ?&gt;" value="&lt;?php echo $tt_twitter_value; ?&gt;" size="25"&gt;
&lt;/p&gt;

&lt;p class="submit"&gt;
&lt;input type="submit" name="Submit" value="&lt;?php _e('Update Options', 'mt_trans_domain' ) ?&gt;" /&gt;
&lt;/p&gt;

&lt;/form&gt;
&lt;/div&gt;</pre>
<p>Alright, so we&#8217;re at the last bit of code. This should be pretty straightforward. This is what is going to actually show up when you load the new page we created. We have our header being echoed out, our input fields, and our submit button. The user will now be able to enter in a twitter username, and hit save. If he/she comes back to the same page the field will be populated with the same twitter username.</p>
<h2>Phew. So we have the input, what can I do with it?</h2>
<p>Well, you can essentially grab that value whenever and wherever you want within thesis by calling <strong>get_option(&#8216;tt_twitter_name&#8217;);</strong>. For example, <a href="http://thesisthemes.com/">as seen on my most recent skins</a>,  if you wanted to have a link to the users twitter account you would enter something like:</p>
<pre class="brush: php;">&lt;?php $tt_twitter_username = get_option('tt_twitter_name'); ?&gt;
&lt;p class="tt_twitter"&gt;&lt;a href="http://www.twitter.com/&lt;?php echo $tt_twitter_username; ?&gt;"&gt;Follow on Twitter&lt;/a&gt;&lt;/p&gt;</pre>
<h2>What now?</h2>
<p>At this point we are beyond Thesis. If you read this coming from a WordPress theme designer you probably didn&#8217;t get much from this, as it&#8217;s essentialy the same stuff. The only difference is you have to call the functions from the custom_functions.php file (which you can and should extend to different php files). For further tutorials, references, and code check out <a href="http://codex.wordpress.org/">http://codex.wordpress.org/</a>. Didn&#8217;t get something above? Add me to <a href="http://www.twitter.com/matthodder">Twitter</a> or write me below, and I&#8217;ll do my best to help out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.matthodder.com/thesis-skins-add-an-options-menu-to-wordpress/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.627 seconds -->
