<?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>AmberWeinberg.com &#187; Bill Chambers</title> <atom:link href="http://www.amberweinberg.com/author/bill/feed/" rel="self" type="application/rss+xml" /><link>http://www.amberweinberg.com</link> <description>Design, Development and Freelance Articles and Tutorials</description> <lastBuildDate>Fri, 03 Feb 2012 15:14:56 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Look Before You Leap Into Thesis Theme</title><link>http://www.amberweinberg.com/look-before-you-leap-into-thesis-theme/</link> <comments>http://www.amberweinberg.com/look-before-you-leap-into-thesis-theme/#comments</comments> <pubDate>Tue, 09 Mar 2010 16:00:40 +0000</pubDate> <dc:creator>Bill Chambers</dc:creator> <category><![CDATA[blog]]></category> <category><![CDATA[development]]></category> <category><![CDATA[php]]></category> <category><![CDATA[tutorial]]></category> <category><![CDATA[wordpress]]></category><guid
isPermaLink="false">http://www.amberweinberg.com/?p=1637</guid> <description><![CDATA[I was recently hired to make what I thought was going to be a simple change for a client. Modify the navigation on a WordPress blog to match their static site. The menu items were already listed but were in the wrong order. So, knowing that the blog was running on WordPress I said sure! My [...]]]></description> <content:encoded><![CDATA[<p><img
class="alignright size-large wp-image-1656" src="http://www.amberweinberg.com/wp-content/uploads/2010/02/thesis-wordpress-theme-590x381.png" alt="" width="590" height="381" /></p><p>I was recently hired to make what I thought was going to be a simple  change for a client. Modify the navigation on a <a
title=\"Custom WordPress Themes\" href="http://www.amberweinberg.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5hbWJlcndlaW5iZXJnLmNvbS9jcmVhdGluZy1jdXN0b20td29yZHByZXNzLXRoZW1lcy1wYXJ0LTEtaWRlbnRpZnkteW91ci10aGVtZS8=">WordPress blog</a> to match  their static site. The menu items were already listed but were in the wrong order.</p><p>So, knowing  that the blog was running on WordPress I said sure!</p><p>My first thought was OK, I will just get in there rearrange the order of  the pages by id, and be done. Easy enough right?</p><h3>Look Before You Leap!</h3><p>What I didn&#8217;t know from talking to the client, was that their blog  was running a premium theme by the name of Thesis. I had never worked with Thesis before but I have read about it and heard  about its SEO capabilities, easy to customize by anyone etc etc.</p><p>Having never worked with Thesis before, I had no idea that adding a page  order plug-in wouldn&#8217;t work. I quoted a very small amount to make this  10 minute change and I am now at one hour into the job wondering why  this simple fix didn&#8217;t work.</p><p>What I discovered during my research is that Thesis basically doesn&#8217;t do  things like a normal template, due to the complexity of it&#8217;s admin pages. I did find some information on customizing the navigation menu for  WordPress pages but it wasn&#8217;t what I needed. This site has no pages set  up through WordPress. Just the blog itself.</p><h3>Adding a Custom Menu</h3><p>So 3.5 hours of research later, I decided to just start hacking away.  I downloaded my clients template to my local server, and through some  trial and error came up with the information below.</p><p>First, Thesis uses it&#8217;s own custom options panel. Once Thesis is  installed and activated, you will see a new menu item in the admin panel  called Thesis Options. So, instead of going to Appearance and using the  file editor in WordPress, you want to go to Thesis Options&gt;Custom  File Editor to edit the custom_functions.php. You can also use your  favorite text editor and then upload the file if you prefer.</p><p>First, I created the new function which is the custom nav menu:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span>  custom_nav_menu<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span></pre></div></div><p>What we did was define our new function, custom_nav_menu, and the curly bracket opens the function.  We close out the PHP to allow for the HTML in the next section. Since this is the first function in our custom_functions.php file, we don&#8217;t need to open PHP. It is already the first line in the custom_functions.php file. We will only close it and reopen it as needed.</p><p>Next we insert our HTML  for the menu  (You can add anything here, such as a div, some more php or even a new page).</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>ul<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://reallycoollink.here&quot;</span><span style="color: #339933;">&gt;</span>One<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://reallycoollink.here&quot;</span><span style="color: #339933;">&gt;</span>Two<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://reallycoollink.here&quot;</span><span style="color: #339933;">&gt;</span>Three<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://reallycoollink.here&quot;</span><span style="color: #339933;">&gt;</span>Four<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://reallycoollink.here&quot;</span><span style="color: #339933;">&gt;</span>Five<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://reallycoollink.here&quot;</span><span style="color: #339933;">&gt;</span>Six<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>ul<span style="color: #339933;">&gt;</span>
<span style="color: #009900;">&#125;</span></pre></div></div><p>What we did was add our HTML for the custom navigation, re-opened PHP and closed out the function with the curly bracket.</p><p>And that is it for the custom nav function! You can do more like drop  downs etc but I am just giving the basics.</p><h3>Removing The Old Menu</h3><p>Next, we need to get rid of the old menu. We do this by editing the  custom_functions.php file like so:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;">remove_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'thesis_hook_before_header'</span><span style="color: #339933;">,</span>  <span style="color: #0000ff;">'thesis_nav_menu'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>Thesis uses it&#8217;s own hooks. They are basically similar to modules and where they are positioned. By default, the nav menu is above the header, so the remove_action is telling thesis to take out the hook above the header which removes the thesis nav menu function.</p><p>Next we want to insert our custom nav menu in its place:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;">add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'thesis_hook_before_header'</span><span style="color: #339933;">,</span>  <span style="color: #0000ff;">'custom_nav_menu'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>Now your completed code should look like this:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//Add custom Menu</span>
<span style="color: #000000; font-weight: bold;">function</span> custom_nav_menu<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;</span>ul<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://reallycoollink.here&quot;</span><span style="color: #339933;">&gt;</span>One<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://reallycoollink.here&quot;</span><span style="color: #339933;">&gt;</span>Two<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://reallycoollink.here&quot;</span><span style="color: #339933;">&gt;</span>Three<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://reallycoollink.here&quot;</span><span style="color: #339933;">&gt;</span>Four<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://reallycoollink.here&quot;</span><span style="color: #339933;">&gt;</span>Five<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://reallycoollink.here&quot;</span><span style="color: #339933;">&gt;</span>Six<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>ul<span style="color: #339933;">&gt;</span></pre></div></div><h3>Styling The Custom Navigation</h3><p>Now, if we want to add some styling you can edit the custom.css file. Just make sure to add .custom to your classes like this:</p><div
class="wp_syntax"><div
class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.custom</span> <span style="color: #6666ff;">.menu</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;">none</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">-42px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span>  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">55em</span><span style="color: #00AA00;">;</span>height<span style="color: #00AA00;">:</span><span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>z-index<span style="color: #00AA00;">:</span><span style="color: #cc66cc;">1000</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div><p>And to your id&#8217;s like this:</p><div
class="wp_syntax"><div
class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#menu</span> <span style="color: #6666ff;">.custom</span> <span style="color: #00AA00;">&#123;</span>more<span style="color: #00AA00;">:</span>really<span style="color: #00AA00;">;</span> cool<span style="color: #00AA00;">:</span>css<span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div><p>(.custom tells Thesis to use this style)</p><p>Of course you will want to add your own CSS to style it.</p><p>Now you are rocking thesis with a brand new nav menu!</p><h3>Closing Thoughts</h3><p>After spending a day figuring out and working with Thesis, I don&#8217;t see what all the hype is about. Any WP template that is properly coded will have the same SEO capabilities as Thesis.</p><p>You can add on the <a
title=\"All in One SEO Pack\" href="http://www.amberweinberg.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dvcmRwcmVzcy5vcmcvZXh0ZW5kL3BsdWdpbnMvYWxsLWluLW9uZS1zZW8tcGFjay8=" target=\"_blank\">All in One SEO Pack</a> and <a
title=\"Google XML Sitemaps Plugin\" href="http://www.amberweinberg.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dvcmRwcmVzcy5vcmcvZXh0ZW5kL3BsdWdpbnMvZ29vZ2xlLXNpdGVtYXAtZ2VuZXJhdG9yLw==" target=\"_blank\">Google XML Sitemaps</a> plug-in and be well on your way. There are also numerous blog postings on how to further increase the SEO capabilities of WordPress.</p><p>I hope this helps someone out there and for all of you freelancers, look before you leap! Make sure to ask those probing questions and check out what they have going on behind the scenes before you give a price. At a minimum view the source and check out the CSS file for the template name <img
src='http://www.amberweinberg.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p><h3>Your Thoughts</h3><p>Have any of you worked with Thesis? What are your thoughts on it?</p> <img
src="http://www.amberweinberg.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=1637" width="1" height="1" style="display: none;" />]]></content:encoded> <wfw:commentRss>http://www.amberweinberg.com/look-before-you-leap-into-thesis-theme/feed/</wfw:commentRss> <slash:comments>43</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching using disk: basic
Object Caching 219/237 objects using disk: basic

Served from: www.amberweinberg.com @ 2012-02-04 02:39:13 -->
