<?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> &#187; WordPress</title>
	<atom:link href="http://toolboxdigital.com/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://toolboxdigital.com</link>
	<description></description>
	<lastBuildDate>Fri, 24 Feb 2012 15:53:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Are Template Clubs Losing The Plot?</title>
		<link>http://toolboxdigital.com/2011/01/are-template-clubs-losing-the-plot/</link>
		<comments>http://toolboxdigital.com/2011/01/are-template-clubs-losing-the-plot/#comments</comments>
		<pubDate>Wed, 19 Jan 2011 16:30:31 +0000</pubDate>
		<dc:creator>Dan Luton</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Templates]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://toolboxdigital.com/?p=751</guid>
		<description><![CDATA[My opinion on the growing trend amongst template clubs of adding too much "bloat" to templates, and why they should be carefully considered.]]></description>
			<content:encoded><![CDATA[<h4>I&#39;ve long been a fan of the cutting-edge design work produced by many of the top template clubs.</h4>
<p>Rich, unique designs are being published every month for keen club members to download and deploy for their own web projects, making it easy to get an amazing looking website up-and-running in relatively little time.</p>
<p>However, what I&#39;m not a fan of is the way many templates are built these days.</p>
<p><span id="more-751"></span></p>
<p><img alt="Downloading" class="alignnone size-full wp-image-752" src="http://toolboxdigital.com/wp-content/uploads/2011/01/downloading.jpg" title="Downloading" /></p>
<p>A good poke around under the hood is enough to make anyone who works with HTML/PHP/CSS frown at what&#39;s going on &#8211; yes, the code is normally nicely structured, but what is rendered in the browser needs to be carefully considered before using a commercial theme.</p>
<h3>Framework = More Work?</h3>
<p>The trend these days is to use a proprietary theme framework &#8211; these are produced by the clubs and normally the core is shared under a GPL license. All of the club template releases are built on this framework, which offers a bewildering amount of flexibility in layout and features. Often they come complete with an entire management system which is used to configure how everything works. This management can even stretch beyond the template and start managing core features of the CMS itself.</p>
<p>However, the learning curve tends to be steep, with the frameworks being massively complex in their implementation, and core changes to the code are far more difficult than they would be for a more traditionally constructed theme.</p>
<p>Many aspects of the layout can be adjusted within the theme&#39;s setup options, so in a lot of cases, code intervention isn&#39;t really needed &#8211; but what if you need to break free of the framework for something? You have to commit to learning how everything works within the framework, and often even small adjustments are hugely complex given the more rigid nature of the frameworks (which are normally based on a CSS grid system).</p>
<h3>More Features = Less Performance</h3>
<p>Ah, HTTP requests. A real hog of performance, and something you want to really keep to a minimum. By using clever techniques such as CSS sprites, JS and CSS combining, you can massively reduce the number of requests thus speeding things up &#8211; a win for your users, a win for your host, and a win for the performance of the site.</p>
<p>Now, I understand the requirement to separate elements up in order to give flexibility to a theme &#8211; but at what cost? Dozens of individual CSS and Javascript files cannot be a good thing.</p>
<p>Take a nice, lean CMS like WordPress for example. I recently was asked to investigate why the breadcrumb trail wasn&#39;t working (turns out the theme&#39;s breadcrumbs file was pretty much useless) and was horrified at the source output that I saw. Take a look at these stats:</p>
<p>section (a &#39;normal&#39; site would be around 20-100 lines) including:</p>
<ul class="bullet">
<li>233 lines of code for the <strong>&lt;head></strong> section (a ‘normal’ site would be around 20-100 lines) including:</li>
<li>46 lines of embedded CSS</li>
<li>16 separate CSS files</li>
<li>12 separate Javascript files</li>
<li>2 Javascript libraries</li>
<li>Almost 1400 lines of code for the home page</li>
</ul>
<p>Which all add up to the following:</p>
<ul class="bullet">
<li>308 total objects</li>
<li>287 images</li>
<li>300Kb of scripts</li>
<li>A 2,700Kb total page size</li>
</ul>
<p>Of course, I understand that sites will vary in content, plus there were a couple of extra plug-ins installed in this case &#8211; but a quick look at the relevant demo sites paints a pretty similar picture. When you consider that template clubs usually run on some pretty beefy server hardware, they can give a false impression of how the template might perform. Once deployed to a more common shared hosting platform, performance will undoubtedly suffer.</p>
<h3>What can we do about it?</h3>
<p>Template clubs and their projects are obviously a great way for novice developers and webmasters to get started, but many will be oblivious to what goes on under the surface of a theme, blinded by the fancy design and effects.</p>
<p>It&#39;s a shame in some ways, as the popularity of these clubs means that a high percentage of CMS websites will be using them, which could portray the whole platform in a negative light if the performance of a platform is judged on these sites.</p>
<p>My advice: take a look at what&#39;s going on under the hood when using a club template, you might be surprised at what you see. All those features aren&#39;t really free, and are costing you dearly in terms of performance. Also, to get some real stats on your site, run it through a performance checker like <a href="http://websiteoptimization.com/services/analyze/" target="_blank">http://websiteoptimization.com/services/analyze/</a> to see how your own projects perform.</p>
<p>Of course, not all theme providers can be tarred with the same brush &#8211; know of a club producing more streamlined templates without all the fluff? Let us know in the comments!</p>
]]></content:encoded>
			<wfw:commentRss>http://toolboxdigital.com/2011/01/are-template-clubs-losing-the-plot/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Advanced WordPress sub-navigation using wp_list_pages</title>
		<link>http://toolboxdigital.com/2010/11/advanced-wordpress-sub-navigation-using-wp_list_pages/</link>
		<comments>http://toolboxdigital.com/2010/11/advanced-wordpress-sub-navigation-using-wp_list_pages/#comments</comments>
		<pubDate>Tue, 23 Nov 2010 14:37:19 +0000</pubDate>
		<dc:creator>Dan Luton</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://toolboxdigital.com/?p=710</guid>
		<description><![CDATA[I present a technique for layered navigation/split menus in WordPress.]]></description>
			<content:encoded><![CDATA[<h4>We recently worked on a site development for <a href="http://evolve-od.co.uk">evolveOD</a> which needed a 3-level navigation structure, the top-level being the main navigation menu, with levels 2 and 3 displayed in the sidebar.</h4>
<p>Whilst <strong>wp_nav_menu</strong> allows us to build such complex multi-tiered menus, it unfortunately doesn&#39;t (yet) let us have as much flexibility as we sometimes need &#8211; for building more flexible split-level menus, for example.</p>
<p><span id="more-710"></span></p>
<p><img alt="Evolve OD" class="alignnone size-full wp-image-712"  src="http://toolboxdigital.com/wp-content/uploads/2010/11/eod.jpg" title="Evolve OD" /></p>
<p>For this method we use a combination of careful page-hierarchy assignments and wp_list_pages to render the output in the sidebar.</p>
<h3>Building the Hierarchy</h3>
<p>First, you will need to make sure your pages are correctly assigned for this to work. This is done by simply assigning your sub-navigation pages as child pages of the top-level page (navigation parent).</p>
<p>For example, our navigation structure might be this:</p>
<p>Products<br />
	&nbsp;&nbsp;&nbsp; &#8211; Toy Cars<br />
	&nbsp;&nbsp;&nbsp; &#8211; Lego<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Technic<br />
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Atlantis<br />
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Lego City<br />
&nbsp;&nbsp;&nbsp;&nbsp;- Dolls</p>
<p>Our page hierarchy must then echo this same structure by assigning your pages to the appropriate parent page.</p>
<h3>Pre-requisites</h3>
<p>This code uses the is_subpage() function to determine the parent page ID. To install this, simply copy the code below into your template&#39;s functions.php file:</p>
<pre class="brush:php">function is_subpage() {
global $post;
if ( is_page() &amp;&amp; $post-&gt;post_parent ) {
$parentID = $post-&gt;post_parent;
return $parentID;
} else {
return false;
};
};
</pre>
<h3>The Code</h3>
<p>Here&#39;s the code that generates the sub-navigation (level 2-3). It should be placed in the sidebar, or wherever you want the sub-navigation to appear:</p>
<pre class="brush:php">&lt;?php
$subPage = is_subpage();
$ancestor = $post-&gt;ancestors[1];
if ($subPage) : // we&#39;re on a sub-page:
if ($ancestor) : // we&#39;re a sub-sub nav item...
echo &quot;&lt;ul class=\&quot;page-list\&quot;&gt;&quot;;
wp_list_pages(&quot;title_li=&amp;child_of=$ancestor&amp;sort_column=menu_order&quot;);
echo &quot;&lt;/ul&gt;&quot;;
else :
echo &quot;&lt;ul class=\&quot;page-list\&quot;&gt;&quot;;
wp_list_pages(&quot;title_li=&amp;child_of=$subPage&amp;sort_column=menu_order&quot;);
echo &quot;&lt;/ul&gt;&quot;;
endif;
endif;
?&gt;
</pre>
<p>Don&#39;t forget to style the menu list as you need to via the main stylesheet.</p>
<h3>Alternative Plug-in</h3>
<p>There&#39;s a great little plug-in you might want to try first, called &quot;Gecka Submenu&quot;:</p>
<p><a href="http://gecka-apps.com/wordpress-plugins/gecka-submenu-pro/" target="_blank">http://gecka-apps.com/wordpress-plugins/gecka-submenu-pro/</a></p>
<p>It utilised the wp_nav_menu function to generate split menus, so in some ways is easier to organize and change your navigation. Unfortunately though, what it cannot seem to do is give a persistent split menu on the bottom-level menu &#8211; so if you are browsing the 3rd level menu, since there are no menus in the structure beyond this level, the menu disappears.</p>
<p>Our solution enables the 3rd level to always remain active, which in most cases, is what you need it to do.</p>
<p><strong>Have any ideas or feedback? We&#39;d love to hear from you, so leave us a comment.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://toolboxdigital.com/2010/11/advanced-wordpress-sub-navigation-using-wp_list_pages/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Hiding your WordPress development site on a live server</title>
		<link>http://toolboxdigital.com/2009/09/hiding-your-wordpress-development-site-on-a-live-server/</link>
		<comments>http://toolboxdigital.com/2009/09/hiding-your-wordpress-development-site-on-a-live-server/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 13:48:43 +0000</pubDate>
		<dc:creator>Dan Luton</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://toolboxdigital.com/?p=49</guid>
		<description><![CDATA[One plugin-free method for hiding your in-development WordPress site from public view whilst you work on it.]]></description>
			<content:encoded><![CDATA[<h4>I recently wanted to develop a WordPress site on a live web server, in the root of the server, using the final domain name &#8211; however, I didn&#39;t want the public to be able to view the work in progress site.</h4>
<p><span id="more-49"></span></p>
<p>What I would normally do in this situation is add an index.html file to the site root, then the following code into .htaccess to ensure the HTML file takes priority over WP&#39;s PHP version of the same file:</p>
<pre class="brush:plain">DirectoryIndex index.html index.php
</pre>
<p>However, this won&#39;t work with WordPress; it rewrites the URL to the domain root (as specified in the WP Settings panel), leaving me with access to my HTML holding page only.</p>
<p>So I set about a different technique. How about only allowing access to the WordPress files to my IP, and displaying the traditional HTML if the IP does not match? Well, that&#39;s what I did.</p>
<p>By adding a simple snippet of code to the WordPress template, you can deny access to the WP site to everyone except you (or, to be more specific, your IP address). The code looks like this:</p>
<pre class="brush:php">&lt;?php $ip=$_SERVER[&#39;REMOTE_ADDR&#39;];
if ($ip !== &quot;111.222.333.444&quot;) : ?&gt;
    &lt;!-- HTML holding page code --&gt;
&lt;?php else : ?&gt;
    &lt;!-- WordPress template code --&gt;
&lt;?php endif; ?&gt;</pre>
<p>Since my WP site used a static page for the landing page, this code needed to be inserted into my page.php template file. If you&#39;re showing posts on your landing page, add the code to the index.php template.</p>
<p>If you move to a different internet connection or use a dynamic IP, you will need to update the file with your <a href="http://www.whatismyip.com/">current IP address</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://toolboxdigital.com/2009/09/hiding-your-wordpress-development-site-on-a-live-server/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

