<?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>Goksel Eryigit - Front-end Developer</title>
	<atom:link href="http://geryit.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://geryit.com/blog</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Mon, 06 Feb 2012 11:17:22 +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>Developing a Responsive Website: The Footer</title>
		<link>http://geryit.com/blog/developing-a-responsive-website-the-footer/</link>
		<comments>http://geryit.com/blog/developing-a-responsive-website-the-footer/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 11:17:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Css3]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Out-source]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://geryit.com/blog/?p=1313</guid>
		<description><![CDATA[At this point we’re just about done with the homepage of our responsive website. We’ve got our navigation in place, our background images resize nicely, and our other elements are able to resize and adjust to various screen resolutions. Today we’re going to focus on tying the page off with a footer. I’ve always admired [...]]]></description>
			<content:encoded><![CDATA[<div>
<p>At this point we’re just about done with the homepage of our responsive website.  We’ve got our navigation in place, our background images resize nicely, and our other elements are able to resize and adjust to various screen resolutions.</p>
<p>Today we’re going to focus on tying the page off with a footer.  I’ve always admired sites that put some thought in to the bottom of their page design.  There are certainly times when a footer requires nothing more than some basic contact info and maybe a copyright claim.<span id="more-1473"></span></p>
<p>But I think it’s a good idea with any site requiring a fair amount of vertical scrolling to go ahead and add a smaller version of your main navigation in to your footer.  This allows the viewer to reach the end of your page and quickly jump to another page on the site.  We’ll put the icing on our footer by feeding in our latest tweet with a little jQuery script and then sprinkle in some contact info.  Before we dive in to it, let’s take a quick peek at what we’re working towards.</p>
<p><img class="aligncenter size-full wp-image-1474" src="http://www.developerdrive.com/wp-content/uploads/2012/01/footer.jpg" alt="" width="600" height="116" /></p>
<p>Much like a website&#8217;s header, I like to use a separate file for my footer and dynamically pull it in to each page with a php include.</p>
<p>This makes for quick and easy updating if a link is added or contact info changes.  Go ahead and open your idex.php file and include your footer, mine is sitting just above the close of my body tag and looks like this.</p>
<pre class="brush: html">&lt;footer&gt;
    	&lt;?php include('footer.php') ?&gt;
&lt;/footer&gt;</pre>
<p>That’s it for our index.php page, go ahead and save it then close out of that file.  Next up we’re going to want to create our footer file and enter all of our content, so open a new document and save it as “footer.php”.  The first tag we’re going to want to drop in our footer.php file is our container id.</p>
<p>This will keep our footer content centered on the page and aligned nicely with the rest of our main content above.  You’ll notice in the image of our footer above that it’s broken down in to three sections, so we’re going to want to include a “footerLeft” class right after we open the container.</p>
<p>We then populate our “footerLeft” class with a miniature version of our main navigation, and then icons linking to our social media pages.  At this point my code looks like this.</p>
<pre class="brush: html">&lt;div id="container"&gt;
	&lt;div class="footerLeft"&gt;
		&lt;ul&gt;
    		&lt;li&gt;&lt;a href="#"&gt;Home&lt;/a&gt;&lt;/li&gt;

        	&lt;li&gt;&lt;a href="#"&gt;Portfolio&lt;/a&gt;&lt;/li&gt;
        	&lt;li&gt;&lt;a href="#"&gt;Services&lt;/a&gt;&lt;/li&gt;
        	&lt;li&gt;&lt;a href="#"&gt;About&lt;/a&gt;&lt;/li&gt;

        	&lt;li&gt;&lt;a href="#"&gt;Blog&lt;/a&gt;&lt;/li&gt;
        	&lt;li class="last"&gt;&lt;a href="#"&gt;Contact&lt;/a&gt;&lt;/li&gt;
    	&lt;/ul&gt;

        &lt;img src="images/blogger.png" /&gt;
        &lt;img src="images/linkedin.png" /&gt;
        &lt;img src="images/facebook_icon.png" /&gt;
        &lt;img src="images/twitter.png" /&gt;
	&lt;/div&gt;&lt;!--end div "footerLeft"--&gt;
&lt;/div&gt;&lt;!--end div “container”--&gt;</pre>
<p>Our middle section is our Twitter feed and is only three simple lines of code, an image wrapped in a div class I named “twitter”.  Our content is populated by jQuery and is set to recognize our “twitter” class as the appropriate location to place our latest tweet.  We’ll dive in to this in our next tutorial.</p>
<pre class="brush: html">&lt;div class="twitter"&gt;
    &lt;img src="images/twitter-preview.png" /&gt;
&lt;/div&gt;&lt;!--end div "twitter"--&gt;</pre>
<p>Lastly we have some contact info, which I aptly named “contact”.  From there simple paragraph and line break formatting displays our contact info.</p>
<pre class="brush: html">&lt;div class="contact"&gt;
    &lt;p&gt;Developer Drive&lt;br&gt;

	123 Fake St.&lt;br&gt;
	Cupertino, CA 95014&lt;br&gt;
	P: 650-555-1212&lt;br&gt;
	F: 650-555-1213&lt;/p&gt;
&lt;/div&gt;&lt;!--end div "contact"--&gt;</pre>
<p>That does it for our footer.php file.  Feel free to check your work against my full footer.php code or save your work and close out of this page.</p>
<pre class="brush: html">&lt;div id="container"&gt;
	&lt;div class="footerLeft"&gt;
		&lt;ul&gt;
    		&lt;li&gt;&lt;a href="#"&gt;Home&lt;/a&gt;&lt;/li&gt;

        	&lt;li&gt;&lt;a href="#"&gt;Portfolio&lt;/a&gt;&lt;/li&gt;
        	&lt;li&gt;&lt;a href="#"&gt;Services&lt;/a&gt;&lt;/li&gt;
        	&lt;li&gt;&lt;a href="#"&gt;About&lt;/a&gt;&lt;/li&gt;

        	&lt;li&gt;&lt;a href="#"&gt;Blog&lt;/a&gt;&lt;/li&gt;
        	&lt;li class="last"&gt;&lt;a href="#"&gt;Contact&lt;/a&gt;&lt;/li&gt;
    	&lt;/ul&gt;

        &lt;img src="images/blogger.png" /&gt;
        &lt;img src="images/linkedin.png" /&gt;
        &lt;img src="images/facebook_icon.png" /&gt;
        &lt;img src="images/twitter.png" /&gt;
	&lt;/div&gt;&lt;!--end div "footerLeft"--&gt;

    &lt;div class="twitter"&gt;
    &lt;img src="images/twitter-preview.png" /&gt;
    &lt;/div&gt;&lt;!--end div "twitter"--&gt;

    &lt;div class="contact"&gt;
    &lt;p&gt;Developer Drive&lt;br&gt;

	123 Fake St.&lt;br&gt;
	Cupertino, CA 95014&lt;br&gt;
	P: 650-555-1212&lt;br&gt;
	F: 650-555-1213&lt;/p&gt;

    &lt;/div&gt;&lt;!--end div "contact"--&gt;
&lt;/div&gt;&lt;!--end div "container"--&gt;</pre>
<p>Now that all of the content is entered in to the appropriate files, we can begin to style it.  Our regular HTML5 footer tag sets the height, color, and font style for our footer.  I also put a thick top border to help separate our footer from our portfolio slider above.</p>
<pre class="brush: css">footer {
	height:250px;
	background-color:#C15007;
	border-top:10px solid #EDEAE5;
	color:#fff;
	font-weight:bold;
	font-weight:.8em;
}</pre>
<p>The .footerLeft class gets a little tricky as there’s quite a bit going on in there with our mini main navigation list elements and images.  Most of this is basic styling, but there are a couple things worth pointing out.</p>
<p>Since we don’t have too much room to make our mini navigation bar fluid and keep it on the same line with decent spacing, I made its width specific.  We’ll rely on the Twitter and contact sections for our minor width adjustments.</p>
<p>Also, it’s worth pointing out that the inline display under our list element is important to maintain the same horizontal appearance of our page links.</p>
<pre class="brush: css">.footerLeft {
	color:#fff;
	float:left;
	width:380px;
	height:150px;
	border-right:1px solid #fff;
	margin-top:5%;
	padding-top:2%;
}

.footerLeft ul li{
	display:inline;
	text-transform:uppercase;
	list-style:none;
	margin-right:2%;
}

.footerLeft ul li a {
	font-size:.8em;
	color:#fff;
	text-decoration:none;
	font-weight:bold;
}

.footerLeft ul li a:hover {
	text-decoration:underline;
}

.footerLeft img {
	float:right;
	margin:5% 2% 5% 0;
}</pre>
<p>Next up we have our Twitter section, notice how we’re back to a percentage based width.  We’re also able to style the time stamp of our tweets to subtly pronounce the time of our last tweet.</p>
<pre class="brush: css">.twitter {
	width: 35%;
	height:150px;
	float:left;
	margin-top:5%;
	padding:2% 2% 0 2%;
	border-right:1px solid #fff;
	color:#fff;
	font-weight:bold;
	font-weight:.8em;
}

.twitter img {
	float:left;
	margin-bottom:100px;
	margin-right:5%;
}

.twitter .tweet a {
	text-decoration: none;
	color:#6BA5BD;
	font-weight:bold;
	font-weight:.8em;
}

.twitter .tweet a:hover {
	text-decoration: underline;
}

.twitter .tweet .time {
	font-size:10px;
	font-style:italic;
	color:#FFD08C;
}</pre>
<p>Lastly, we’ll add some spacing to our contact section for an evenly spaced look.</p>
<pre class="brush: css">.contact {
	float:left;
	margin-top:5%;
	padding:2% 2% 0 2%;
}</pre>
<p>Next week we’ll finish off the styling to make our footer fully responsive as well as discuss the jQuery Twitter feed.  In the mean time, test your responsive skills and see if you’re able to make your footer responsive.  Click <a title="here" href="http://www.developerdrive.com/wp-content/uploads/2012/01/Footer-Part-1.zip" target="_blank">here</a> to download the source code.</p>
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://geryit.com/blog/developing-a-responsive-website-the-footer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Implement Google Custom Search into WordPress [.net Magazine]</title>
		<link>http://geryit.com/blog/implement-google-custom-search-into-wordpress-net-magazine/</link>
		<comments>http://geryit.com/blog/implement-google-custom-search-into-wordpress-net-magazine/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 11:39:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Out-source]]></category>
		<category><![CDATA[Seo]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://geryit.com/blog/?p=1302</guid>
		<description><![CDATA[Knowledge needed: Basic PHP, experience with WordPress Requires: WordPress 3.1+ Project time: 1 hour WordPress has a search function which has developers opinions split. Freelancer Paul Maloney shows us how to replace the search function with a super powered Google Custom Search engine View demo: http://netmag.clientden.com/ WordPress and its search function &#8211; this is a [...]]]></description>
			<content:encoded><![CDATA[<div class="content">
<div class="tutorial-details" >
<ul>
<li><strong>Knowledge needed</strong>: Basic PHP, experience with WordPress</li>
<li><strong>Requires</strong>: WordPress 3.1+</li>
<li><strong>Project time</strong>: 1 hour</li>
</ul>
<div class="clear-both" ></div>
</div>
<h2 class="strapline">
         WordPress has a search function which has developers opinions split. Freelancer Paul Maloney shows us how to replace the search function with a super powered Google Custom Search engine      </h2>
<div class="copy" >
<p><em>View demo: <a href="http://netmag.clientden.com/" rel="nofollow">http://netmag.clientden.com/</a></em></p>
<p>WordPress and its search function &ndash; this is a subject that often splits the most hardcore WordPress users. Terms like &ldquo;abysmal&rdquo; are frequently banded about among developers, I personally defend it&hellip; to a certain level.</p>
<p>For smaller sites the search function does its job successfully, it&rsquo;s no frills and does what it says on the tin, but for larger sites it can be like taking a spoon to a bazooka fight. So today I plan to show you how to integrate Google Custom Search into your WordPress install and harness the raw power of the world&rsquo;s most powerful search solution.</p>
<p>Before we get into the nitty gritty I wanted to briefly cover something that has come up as an issue (of sorts) for me while replacing the search function. As we all know Google Custom Search will use Google results for your site so we need to ensure Google has good access to our content, so installing the <a href="http://wordpress.org/extend/plugins/google-sitemap-generator/" rel="nofollow">Google XML Sitemap plugin</a> will assist in Google&rsquo;s indexing quest. The other point of note is due to the way WordPress archives work, Google may index multiple versions of your posts so you could in effect have several versions of the same article competing in your own search results, so to combat this I opted to use the <a href="http://wordpress.org/extend/plugins/all-in-one-seo-pack/" rel="nofollow">All In One SEO Pack plug-in</a> and set it up so only single posts would appear.</p>
<p>Not only will using these (or similar) plug-ins help your custom search work more efficiently; it&rsquo;s also good SEO practice and could help you climb up those pages!</p>
<p>Now we can move onto the part you have been patiently waiting for, the actual implementation of Google Custom Search into WordPress.</p>
<h4 class="advert_mpu_body_hdr">Advertisement</h4>
<p><script>
         var d = new Date();
         var ord = d.getFullYear()+''+d.getMonth()+''+d.getDay()+''+d.getMinutes()+''+d.getSeconds();
         var script = '<scr'+'ipt src="http://ad.doubleclick.net/adj/fut.gb.net/tutorials;kw=Search;kw=WordPress;tile=4;sz=300x250;pos=2;'+segQS+';gs_cat='+gs_channels+';ord='+ord+'?" ></scr'+'ipt>';
   document.write('
<div id="advert_mpu_body_1_source" class="advert_source" >'+script+'</div>
<p>');</script><noscript><a href="http://ad.doubleclick.net/jump/fut.gb.net/tutorials;kw=Search;kw=WordPress;tile=4;sz=300x250;ord=2012013104?" target="_blank"><img src="http://ad.doubleclick.net/ad/fut.gb.net/tutorials;kw=Search;kw=WordPress;tile=4;sz=300x250;pos=2;ord=2012013104?" width="300" height="250" alt=""></a></noscript></p>
<h2>Creating a custom search engine</h2>
<p>First thing first, we need to visit Google Custom Search and set up our search engine. Follow this link: <a href="http://www.google.com/cse/" rel="nofollow">http://www.google.com/cse/</a> and you will be taken to the Google Custom Search page were you can create or manage your search engines.</p>
<figure class="captioned-image" style="width:635px" ><img alt="" src="http://media.netmagazine.com/files/images/2012/1/custom_search_page_one.jpg" style="width:615px; height:486px" /></figure>
<p>We need to give our search engine a name, description and define its primary language, then we need to give it a list of sites to search, so in our case it would just be our site, so for example: <a href="http://www.netmagazine.com" title="http://www.netmagazine.com">http://www.netmagazine.com</a>.</p>
<p>You then need to select an edition, there is an ad supported free version or, for the more financially blessed among us, we can go for the paid version and wave goodbye to those ads.</p>
<figure class="captioned-image" style="width:635px" ><img alt="" src="http://media.netmagazine.com/files/images/2012/1/custom_search_page_two.jpg" style="width:615px; height:336px" /></figure>
<p>At this point Google Custom Search offers little in the way of customisation, but does offer a few themes and layouts we can use and hopefully one of those will work on our WordPress install.</p>
<figure class="captioned-image" style="width:635px" ><img alt="" src="http://media.netmagazine.com/files/images/2012/1/custom_search_page_three.jpg" style="width:615px; height:478px" /></figure>
<p>The final step over at Google is to grab our code for our custom search engine, Google recommends using a supported Doc Type such as<strong> &lt;!DOCTYPE html&gt;</strong> in your pages as the custom search uses some CSS hover effects.</p>
<p>Below our code Google also offers some further options that you can use to customise the custom search a little further, which in this case we will need to do.</p>
<figure class="captioned-image" style="width:635px" ><img alt="" src="http://media.netmagazine.com/files/images/2012/1/layout.jpg" style="width:615px; height:400px" /></figure>
<p>Hit the <strong>change the look and feel</strong> link and you will be presented with some layout and style options. We will need to use the <strong>Results only</strong> layout as we will be using our own search box. Tthe style is totally up to you. Once that is done, hit the <strong>Save &amp; Get Code</strong> button and we can then finish this part off by grabbing our code.</p>
<figure class="captioned-image" style="width:635px" ><img alt="" src="http://media.netmagazine.com/files/images/2012/1/get_code.jpg" style="width:615px; height:400px" /></figure>
<p>You will need to specify your site details such as HTTP/HTTPS and specify the search result details &ndash; we should use &ldquo;q&rdquo;, which is the default Google search query parameter.</p>
<p>Our code is now ready to use in our WordPress install, so keep it in a safe place for the time being.</p>
<h2>Building the results page</h2>
<p>To get the custom search in place of WordPress&rsquo; in built search function we are going to use a custom page template <em>(you can read more about these here: </em><a href="http://codex.wordpress.org/Pages#Page_Templates" rel="nofollow"><em>http://codex.wordpress.org/Pages#Page_Templates</em></a><em>).</em></p>
<p>At the beginning of a custom page template you must define your custom page name so it can be used by WordPress, so we will name our template <strong>googlesearch.php</strong> and place this at the top of our custom page:</p>
<div class="geshifilter">
<div class="php geshifilter-php">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">&lt;?php</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">/*</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">Template Name: Google Search</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">*/</span></div>
</li>
<li class="li1">
<div class="de1"><span class="sy1">?&gt;</span></div>
</li>
</ol>
</div>
</div>
<p>The file name and template name can of course be altered and named to anything you wish.</p>
<p>Once that is in place, you can continue to build the rest of your page. For this tutorial I will be using the TwentyEleven theme and using the <strong>page.php</strong> as a base to work from, which looks a little something like this:</p>
<div class="geshifilter">
<div class="php geshifilter-php">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">&lt;?php</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co4">/**</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co4">&nbsp;* The template for displaying all pages.</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co4">&nbsp;*</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co4">&nbsp;* This is the template that displays all pages by default.</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co4">&nbsp;* Please note that this is the WordPress construct of pages</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co4">&nbsp;* and that other &#8216;pages&#8217; on your WordPress site will use a</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co4">&nbsp;* different template.</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co4">&nbsp;*</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co4">&nbsp;* @package WordPress</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co4">&nbsp;* @subpackage Twenty_Eleven</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co4">&nbsp;* @since Twenty Eleven 1.0</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co4">&nbsp;*/</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">get_header<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span> <span class="sy1">?&gt;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div id=&quot;primary&quot;&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div id=&quot;content&quot; role=&quot;main&quot;&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">&lt;?php</span> <span class="kw1">while</span> <span class="br0">&#40;</span> have_posts<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#41;</span> <span class="sy0">:</span> the_post<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span> <span class="sy1">?&gt;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">&lt;?php</span> get_template_part<span class="br0">&#40;</span> <span class="st_h">&#8216;content&#8217;</span><span class="sy0">,</span> <span class="st_h">&#8216;page&#8217;</span> <span class="br0">&#41;</span><span class="sy0">;</span> <span class="sy1">?&gt;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">&lt;?php</span> comments_template<span class="br0">&#40;</span> <span class="st_h">&#8221;</span><span class="sy0">,</span> <span class="kw4">true</span> <span class="br0">&#41;</span><span class="sy0">;</span> <span class="sy1">?&gt;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">&lt;?php</span> <span class="kw1">endwhile</span><span class="sy0">;</span> <span class="co1">// end of the loop. ?&gt;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;/</span>div<span class="sy0">&gt;&lt;!&#8211;</span> <span class="co2">#content &#8211;&gt;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;/</span>div<span class="sy0">&gt;&lt;!&#8211;</span> <span class="co2">#primary &#8211;&gt;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">&lt;?php</span> get_footer<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span> <span class="sy1">?&gt;</span></div>
</li>
</ol>
</div>
</div>
<p>That gives us our base to work with, but we need to add the code from Google and remove the things we don&#39;t need from the standard page template.</p>
<p>We don&rsquo;t need the content or comments part so they can be removed, and then you can add your search code so you end up with something like this:</p>
<div class="geshifilter">
<div class="php geshifilter-php">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">&lt;?php</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">/*</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">Template Name: Google Search</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">*/</span></div>
</li>
<li class="li1">
<div class="de1"><span class="sy1">?&gt;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">&lt;?php</span> get_header<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span> <span class="sy1">?&gt;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div id=&quot;primary&quot;&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div id=&quot;content&quot; role=&quot;main&quot;&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">&lt;?php</span> <span class="kw1">while</span> <span class="br0">&#40;</span> have_posts<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#41;</span> <span class="sy0">:</span> the_post<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span> <span class="sy1">?&gt;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&lt;div id=&quot;cse&quot; style=&quot;width: 100%;&quot;&gt;Loading&lt;/div&gt;</div>
</li>
<li class="li1">
<div class="de1">&lt;script src=&quot;http://www.google.com/jsapi&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;</div>
</li>
<li class="li1">
<div class="de1">&lt;script type=&quot;text/javascript&quot;&gt; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; function parseQueryFromUrl () {</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; var queryParamName = &quot;q&quot;;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; var search = window.location.search.substr(1);</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; var parts = search.split(&#8216;&amp;&#8217;);</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; for (var i = 0; i &lt; parts.length; i++) {</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; var keyvaluepair = parts[i].split(&#8216;=&#8217;);</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; if (decodeURIComponent(keyvaluepair[0]) == queryParamName) {</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; return decodeURIComponent(keyvaluepair[1].replace(/\+/g, &#8216; &#8216;));</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; }</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; }</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; return &#8221;;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; }</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; google.load(&#8216;search&#8217;, &#8217;1&#8242;, {language : &#8216;en&#8217;, style : google.loader.themes.MINIMALIST});</div>
</li>
<li class="li1">
<div class="de1">&nbsp; google.setOnLoadCallback(function() {</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; var customSearchControl = new google.search.CustomSearchControl(</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &#8217;005589967590277281119:fumk3dewodg&#8217;);</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; var options = new google.search.DrawOptions();</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; options.enableSearchResultsOnly(); </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; customSearchControl.draw(&#8216;cse&#8217;, options);</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; var queryFromUrl = parseQueryFromUrl();</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; if (queryFromUrl) {</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; customSearchControl.execute(queryFromUrl);</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; }</div>
</li>
<li class="li1">
<div class="de1">&nbsp; }, true);</div>
</li>
<li class="li1">
<div class="de1">&lt;/script&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">&lt;?php</span> <span class="kw1">endwhile</span><span class="sy0">;</span> <span class="co1">// end of the loop. ?&gt;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;/</span>div<span class="sy0">&gt;&lt;!&#8211;</span> <span class="co2">#content &#8211;&gt;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;/</span>div<span class="sy0">&gt;&lt;!&#8211;</span> <span class="co2">#primary &#8211;&gt;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">&lt;?php</span> get_footer<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span> <span class="sy1">?&gt;</span></div>
</li>
</ol>
</div>
</div>
<p>*Notice the code is used inside the loop (<a href="http://codex.wordpress.org/The_Loop" rel="nofollow">codex.wordpress.org/The_Loop</a>).</p>
<p>We can now upload that new file which I have called <strong>googlesearch.php</strong> to our theme folder.</p>
<h2>Creating the search page</h2>
<p>Now the bulk of the code is done we need to create a new page through the WordPress wp-admin, I have called my page &ldquo;Search Results.&rdquo;</p>
<figure class="captioned-image" style="width:635px" ><img alt="" src="http://media.netmagazine.com/files/images/2012/1/add_page.jpg" style="width:615px; height:350px" /></figure>
<p>You will see my page has no content as Google will supply that for us, but the main thing we need to do here is change the template to our custom page template. In this case we need to select the <strong>Google Search</strong> template from the drop down on the right. Once we have done that hit <strong>Publish</strong>.</p>
<figure class="captioned-image" style="width:635px" ><img alt="" src="http://media.netmagazine.com/files/images/2012/1/searchform.jpg" style="width:615px; height:303px" /></figure>
<p>We will also need to alter one other snippet of code. In <strong>searchform.php</strong> we need to alter the <strong>name</strong> field from <strong>s</strong> to <strong>q</strong>, and the form action to the URL of our new results page (in my demos case: <strong>action=&rdquo;<a href="http://netmag.clientden.com/search-results" rel="nofollow">http://netmag.clientden.com/search-results</a>&rdquo;</strong>). Once that has been changed we&#39;re ready to go.</p>
<h2>Tweaking our custom search engine</h2>
<p>If all goes well, we now have a custom search engine that displays our WordPress&rsquo; results on our search-results page.</p>
<figure class="captioned-image" style="width:635px" ><img alt="" src="http://media.netmagazine.com/files/images/2012/1/search_results.jpg" style="width:615px; height:350px" /></figure>
<p>You might notice when you hit a link from your results page, it opens in a new window which is not ideal, so if we want to change this, we can add an extra snippet to our <strong>googlesearch.php </strong>page:</p>
<p>If we add:</p>
<div class="geshifilter">
<div class="php geshifilter-php">
<ol>
<li class="li1">
<div class="de1">customSearchControl<span class="sy0">.</span>setLinkTarget<span class="br0">&#40;</span>google<span class="sy0">.</span>search<span class="sy0">.</span>Search<span class="sy0">.</span>LINK_TARGET_SELF<span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
</ol>
</div>
</div>
<p>between the following:</p>
<div class="geshifilter">
<div class="php geshifilter-php">
<ol>
<li class="li1">
<div class="de1">customSearchControl<span class="sy0">.</span>setResultSetSize<span class="br0">&#40;</span>google<span class="sy0">.</span>search<span class="sy0">.</span>Search<span class="sy0">.</span>FILTERED_CSE_RESULTSET<span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> options <span class="sy0">=</span> <span class="kw2">new</span> google<span class="sy0">.</span>search<span class="sy0">.</span>DrawOptions<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
</ol>
</div>
</div>
<p>so we get this:</p>
<div class="geshifilter">
<div class="php geshifilter-php">
<ol>
<li class="li1">
<div class="de1">customSearchControl<span class="sy0">.</span>setResultSetSize<span class="br0">&#40;</span>google<span class="sy0">.</span>search<span class="sy0">.</span>Search<span class="sy0">.</span>FILTERED_CSE_RESULTSET<span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;customSearchControl<span class="sy0">.</span>setLinkTarget<span class="br0">&#40;</span>google<span class="sy0">.</span>search<span class="sy0">.</span>Search<span class="sy0">.</span>LINK_TARGET_SELF<span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw2">var</span> options <span class="sy0">=</span> <span class="kw2">new</span> google<span class="sy0">.</span>search<span class="sy0">.</span>DrawOptions<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
</ol>
</div>
</div>
<p>Your search results will now open in the same window, which in most cases will be the desired result.</p>
<figure class="captioned-image" style="width:635px" ><img alt="" src="http://media.netmagazine.com/files/images/2012/1/new_window.jpg" style="width:615px; height:350px" /></figure>
<p>Google offers further steps for customisation, such as applying your own stylesheet and using image search with your results but I will allow you to dig into those in further depth at your leisure.</p>
<h2>Conclusion</h2>
<p>While this is a solution that will favour many, it does have a few downsides. New posts might take a few days to get indexed and results can change, so popular pages might rank higher than newer articles and so on&hellip; That being said if you are managing a content heavy site and the inbuilt search feature doesn&rsquo;t cut the mustard, this is probably right up your street.</p>
<div class="clear-both" ></div>
</p></div>
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://geryit.com/blog/implement-google-custom-search-into-wordpress-net-magazine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Designing a Clean Website: Gradients [developerDrive]</title>
		<link>http://geryit.com/blog/designing-a-clean-website-gradients-developerdrive/</link>
		<comments>http://geryit.com/blog/designing-a-clean-website-gradients-developerdrive/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 23:55:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Css3]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Out-source]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://geryit.com/blog/?p=1295</guid>
		<description><![CDATA[This is our third installment of how to design a clean a minimalist website. First we looked at navigation and how to make an accordion style drop-down menu with pure CSS3. Then we moved on to laying the site out and went over rounding corners and applying drop shadows with CSS3. Now we’re going to [...]]]></description>
			<content:encoded><![CDATA[<div>
<p>This is our third installment of how to design a clean a minimalist website.</p>
<p>First we looked at navigation and how to make an accordion style drop-down menu with pure CSS3. Then we moved on to laying the site out and went over rounding corners and applying drop shadows with CSS3.</p>
<p>
		Now we’re going to look at how to create a gradient with CSS3 and apply that to a few of the elements in our homepage.<span id="more-1099"></span>
	</p>
<p>We left off in part two after we pulled our header, navigation and main image in to our layout. Now that we have all those things in place let’s go ahead and put in a few small quick-info type boxes underneath our main image. You can populate these boxes with anything you want, news headlines that link to a blog or news page, images, ads, testimonials, you name it.</p>
<p>For this tutorial I’m just going to use a few of the most recent blog posts off Developer Drive. We’re going to use the &lt;article&gt; tag for these boxes and add a little bit of style to help polish them up. Three of the main style elements I’m going to use on these are rounded corners, drop shadows and gradients.</p>
<p>I styled an article tag with the class “home” and made it 248 px wide by 190 px tall so that they’d align nicely underneath our main image. I also added margins, padding and the rest of the styling as follows.</p>
<pre class="brush: js">article.home {
	float:left;
	width:248px;
	height:190px;
	padding:5px;
	margin:11px 11px 11px 0;
	border:1px solid #737373;
	-moz-border-radius:7px;
	border-radius:7px;
	-webkit-border-radius:7px;
	box-shadow: 2px 2px 2px #838383;
        overflow:hidden;
}</pre>
<p>Next we want to make it look a little less flat and dull and gradients are an excellent way to breathe a little bit of color in to a site and help give it that nice, glossy, modern look.</p>
<p>
		To make a gradient cross-browser compatible requires a lot of redundant coding, so that’s when a site like <a href="http://www.colorzilla.com/">Colorzilla</a> comes in handy. Colorzilla generates cross-browser gradient code for you with a few simple clicks of the mouse.
	</p>
<p>
		<a href="http://www.developerdrive.com/wp-content/uploads/2011/12/colorzilla.jpg"><img class="alignnone size-full wp-image-1100" src="http://www.developerdrive.com/wp-content/uploads/2011/12/colorzilla.jpg" alt="Colorzilla" width="600" height="500" /></a>
	</p>
<p>When making a gradient you set start and stop points for each color, as well as opacity. Adding a simple gradient to something like a navigation bar, or in our case to use as a background, can require a lot of repetitive coding.</p>
<p>Colorzilla makes this process a breeze, click the colors you want, slide the bars to where you want the colors to change, then highlight the automatically generated code and paste it in to your CSS file. You even get a real time preview of what your gradient will look like.</p>
<p>I created a gradient that was a soft grey color that faded to white and we’re going to have it start with the light grey at the bottom of the box and fade to white towards the top. I added the following code that Colorzilla generated for me to my article.home class in my CSS file.</p>
<pre class="brush: js">article.home {
	float:left;
	width:248px;
	height:190px;
	padding:5px;
	margin:11px 11px 11px 0;
	border:1px solid #737373;
	-moz-border-radius:7px;
	border-radius:7px;
	-webkit-border-radius:7px;
	box-shadow: 2px 2px 2px
        overflow:hidden;
        background: #ffffff; /* Old browsers */
        background: -moz-linear-gradient(top, #ffffff 79%, #dddddd 100%); /* FF3.6+ */
        background: -webkit-gradient(linear, left top, left bottom, color-stop(79%,#ffffff), color-stop(100%,#dddddd)); /* Chrome,Safari4+ */
        background: -webkit-linear-gradient(top, #ffffff 79%,#dddddd 100%); /* Chrome10+,Safari5.1+ */
        background: -o-linear-gradient(top, #ffffff 79%,#dddddd 100%); /* Opera 11.10+ */
        background: -ms-linear-gradient(top, #ffffff 79%,#dddddd 100%); /* IE10+ */
        background: linear-gradient(top, #ffffff 79%,#dddddd 100%); /* W3C */
}</pre>
<p>Since we’re going to be displaying some news headlines, let’s style a few other tags that will become useful. I’m going to use and h3 tag for the headline of each article, along with an h3 img tag so that we can include the author’s gravatar image as well.</p>
<p>I also created a h5 tag for the author’s name and the date and then styled a paragraph tag. These are all optional and could be unnecessary if you’re doing something different inside these boxes. When all was said and done my code ended up looking like this:</p>
<pre class="brush: js">article.home h3 {
	font-size:14px;
	margin:0;
	padding:0;
	color:#404648;
}

article.home h5 {
	font-size:10px;
	margin-bottom:0;
	padding-bottom:0;
	color:#404648;
}
article.home h3 img {
	float:left;
	margin-right:10px;
}
article.home p {
	border-top:3px solid #6BA5BD;
	font-size:12px;
	color:#737373;
	margin:0;
	padding-top:5px;
}</pre>
<p>Now that we’ve got all of the styling we need for our little promotional boxes under our main image, let’s jump back in to our index.php file and create the HTML needed and drop in the content.</p>
<p>Staying within the &lt;section&gt; tag, and just under the img src code for our main image, go ahead and place three instance of &lt;arcticle class=”home”&gt;. I just pulled some content out of a few recent Developer Drive articles, so my HTML ended up looking as follows.</p>
<pre class="brush: js">&lt;section&gt;
	&lt;img src="images/main.jpg" /&gt;

    &lt;article class="home"&gt;
    	&lt;h3&gt;&lt;img src="http://1.gravatar.com/avatar/5e4c689cf3621361f2c7ebe5b4eafbe0?s=40&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G" /&gt;Developing With The HTML5 Video Element&lt;/h3&gt;
        &lt;h5&gt;By Scott Stanton - November 23, 2011&lt;/h5&gt;
        &lt;p&gt;Videos have been a great way to attract viewers to a website long before YouTube launched back in 2005.  But it wasn't until the release of HTML5 that web developers have had a lightweight solution to playing the video.  In the past, displaying a video on your site meant your viewer was required to have a Flash or Java-based player installed on their system in order to watch the video.&lt;/p&gt;
    &lt;/article&gt;

    &lt;article class="home"&gt;
    	&lt;h3&gt;&lt;img src="http://0.gravatar.com/avatar/ad76000eb5dc4b306853179632d77400?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G" /&gt;Creating a PHP User Survey: Writing to Database Tables&lt;/h3&gt;
        &lt;h5&gt;By Gerald Hanks - November 22, 2011&lt;/h5&gt;
        &lt;p&gt;In the first two parts of this series, we created the data layer that will hold the polling data and established methods for setting the variable values and reading from the database tables.&lt;br&gt;
In this part, we will build the methods that will write new polls and answers to the tables.
    &lt;/article&gt;
    &lt;article class="home"&gt;
    	&lt;h3&gt;&lt;img src="http://1.gravatar.com/avatar/b8eb0184e62e8a6e71a2d1d7be558248?s=40&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G" /&gt;An Introduction to HTML5's Video API Part 2&lt;/h3&gt;
        &lt;h5&gt;By Louis Lazaris - November 21, 2011&lt;/h5&gt;
        &lt;p&gt;This is the second part in our introduction to HTML5′s video API. In part 1 of this series, I introduced you to the basic markup we'll be using to play the video, then I helped set up a simple script with which we were able to make the controls visible, while ensuring that the native controls will still be visible when JavaScript is disabled.&lt;/p&gt;
    &lt;/article&gt;

&lt;/section&gt;</pre>
<p>Now that we’ve got our boxes and everything in place on our homepage we can utilize another cool new HTML5 tag, &lt;footer&gt;. I kept mine simple and just included some basic info that was wrapped in a &lt;p&gt; tag. Note how I take advantage of the php file and use a tiny snippet of code to dynamically generate the year.</p>
<pre class="brush: js">&lt;footer&gt;
	&lt;p&gt;All Content © Developer Drive &lt;?php echo date ('Y') ?&gt;&lt;/p&gt;
&lt;/footer&gt;</pre>
<p>I gave it some real basic styling back in my CSS file, the only real noteworthy bit being the border-top that helps separate the footer from the rest of the content. My footer styling looks like this.</p>
<pre class="brush: js">footer {
	position:absolute;
	top:747px;
	border-top:1px solid #838383;
	width:805px;
	text-align:center;
	margin-left:105px;
}
footer p {
	font-size:10px;
}</pre>
<p>Now you&#8217;ve got a basic homepage that is clean, simple, polished, and minimalist. You can leave it the way that it is and run with it, or supercharge it by turning your image in to a slider that cycles through several images.</p>
<p>Stay tuned next time where we will cover sub-pages and how to easily display content in a manner that will quickly load and not require the viewer to load a new page on each link they click.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://geryit.com/blog/designing-a-clean-website-gradients-developerdrive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adventures In The Third Dimension: CSS 3D Transforms [smashingmag]</title>
		<link>http://geryit.com/blog/adventures-in-the-third-dimension/</link>
		<comments>http://geryit.com/blog/adventures-in-the-third-dimension/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 23:30:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Css3]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Out-source]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://geryit.com/blog/?p=1287</guid>
		<description><![CDATA[Back in 2009, the WebKit development team proposed a new extension to CSS that would allow Web page elements to be displayed and transformed on a three-dimensional plane. This proposal was called 3D Transforms, and it was soon implemented in Safari for Mac and iOS. About a year later, support followed for Chrome, and early [...]]]></description>
			<content:encoded><![CDATA[<p>
	Back in 2009, the WebKit development team proposed a new extension to CSS that would allow Web page elements to be displayed and transformed on a three-dimensional plane. This proposal was called <strong>3D Transforms</strong>, and it was soon implemented in Safari for Mac and iOS. About a year later, support followed for Chrome, and early in 2011, for Android. Outside of WebKit, however, none of the other browser makers seemed to show much enthusiasm for it, so it’s remained a fairly niche and underused feature.
</p>
<p>That’s set to change, though, as the Firefox and Internet Explorer teams have decided to join the party by implementing 3D Transforms in pre-release versions of their browsers. So, if all goes according to plan, we’ll see them in IE 10 and a near-future version of Firefox (possibly 10 or 11, but that’s not confirmed yet), both of which are slated for release sometime this year.</p>
<p>That being the case, this is an ideal time to get ahead of the curve and start learning about the possibilities and potential of adding an extra dimension to your Web pages. This article aims to help you do just that, by taking you on a flying tour of the 3D Transforms syntax.</p>
<p>
	Please bear in mind that in order to see the examples in this article, you’ll need a browser that supports 3D Transforms; as I write this, that’s Safari, Chrome, <a href="http://ie.microsoft.com/testdrive/Info/Downloads/Default.html">IE 10 Platform Preview</a> or <a href="http://www.mozilla.org/firefox/channel/">Firefox Aurora</a>.
</p>
<div id="textadtarget"></div>
<h3>The Third Dimension</h3>
<p>On the Web, we’re accustomed to working in two dimensions: all elements have width and height, and we move them around the screen horizontally (left to right) and vertically (top to bottom). The move to a third dimension can be thought of as adding depth to elements, and adding movement towards and away from you (the viewer). Think about 3D films in which objects are constantly thrust out of the screen towards you in an attempt to demonstrate the possibilities of the extra depth.</p>
<p>To use 3D Transforms in CSS, you’ll need to know about axes (that’s the plural of axis, not the plural of axe). If you already know about working in three dimensions or remember using axes in math class at school, you can skip the next section. For everyone else, here is…</p>
<h3>A Quick Primer On Axes</h3>
<p>
	I just mentioned that on the 2-D Web, we move elements around horizontally and vertically. Each of these directions is called an axis: the horizontal line is known as the <strong>x-axis</strong>, and the vertical line is the <strong>y-axis</strong>. If we think of the top-left corner of an element as our origin (i.e. the point from which movement is measured), a movement to the left is a negative movement along the x-axis, and a move to the right is a positive movement along the x-axis. The same goes for moving an element up (negative on the y-axis) and down (positive on the y-axis).
</p>
<p>
	The third dimension is known as the <strong>z-axis</strong> and, as I said, can be thought of as towards or away from you; a negative movement along the z-axis is away from you, and a positive movement is towards you.
</p>
<p>
	<img src="http://coding.smashingmagazine.com/wp-content/uploads/2011/11/dimensions.jpg" alt="screenshot" width="400" height="270" /><br /> <em>Showing the three axes: x (left-right), y (up-down) and z (away-towards).</em>
</p>
<p>If you’ve read all of this talk of axes and negative movements and you’re rubbing your eyes and blinking in disbelief and misunderstanding, don’t worry: it will all become clear when you get stuck in the code. Come back and read this again after a few examples and it should all be clear.</p>
<h3>Transformation Functions</h3>
<p>
	The various transformations are all applied with a single CSS property:<br />
	<code>transform</code><br />
	— yes, the same property that’s used for 2-D CSS Transforms. At the moment, this property is still considered experimental, so remember to use all of the browser prefixes, like so:
</p>
<pre>div {
  -moz-transform: foo;
  -ms-transform: foo;
  -o-transform: foo;
  -webkit-transform: foo;
}</pre>
<p>Note that Opera doesn’t currently have an implementation of 3D Transforms, but I’m including it here because work is apparently underway. For the sake of clarity, in the examples throughout this article, I’ll use only non-prefixed properties, but remember to include all of the prefixed ones in your own code.</p>
<p>
	Anyway, the<br />
	<code>transform</code><br />
	property accepts a range of functions as values, each of which applies a different transformation. If you’ve used 2-D CSS Transforms, then you’ll already know many of these functions because they are quite similar (or, in some cases, the same). Here are all of the 3D functions:
</p>
<ul>
<li><code>matrix3d</code></li>
<li><code>perspective</code></li>
<li><code>rotateX</code>, <code>rotateY</code>, <code>rotateZ</code>, <code>rotate3d</code></li>
<li><code>scaleX</code>, <code>scaleY</code>, <code>scaleZ</code>, <code>scale3d</code></li>
<li><code>translateX</code>, <code>translateY</code>, <code>translateZ</code>, <code>translate3d</code></li>
</ul>
<p>
	Now,<br />
	<code>matrix3d</code><br />
	definitely sounds the coolest, but it’s so unbelievably complex (it takes 16 values!) that there’s no way I could cover it in this article. So, let’s put that aside and take a quick look at the others.
</p>
<h4>Rotation</h4>
<p>
	To explain what this does, I’ll have to ask you to do a little mental exercise (which will come in useful later in the article, too). Imagine a sheet of card with a string running through the middle that fixes it in place. By taking the top corners in your fingers, you can move the card up and down, left and right, and forwards and backwards, pivoting around the string. This is what the<br />
	<code>rotate()</code><br />
	function does. The individual functions<br />
	<code>rotateX()</code><br />
	,<br />
	<code>rotateY()</code><br />
	and<br />
	<code>rotateZ()</code><br />
	take a<br />
	<code>deg</code><br />
	(i.e. degree) value and move the element around its point of origin (where the string passes through it) by that much.
</p>
<p>
	Have a look at <a href="http://provide.smashingmagazine.com/smashingmag-3d/example1.html">our first example</a> (a screenshot is shown below in case you don’t have access to a supported browser). Here we’ve rotated each of the elements 45° around a different axis (in order: x, y, z), so you can see the effect of each. The semi-translucent red box shows the original position of the element, and if you mouse over each, you’ll see the transformations removed (I’ve used this convention in all of the examples in this article).
</p>
<p>
	<a href="http://provide.smashingmagazine.com/smashingmag-3d/example1.html"><img src="http://coding.smashingmagazine.com/wp-content/uploads/2011/11/example1.jpg" alt="screenshot" width="500" /></a><br /> <em>Each element is rotated 45° around a different axis: x (left), y (center) and z (right).</em>
</p>
<p>
	There is a<br />
	<code>rotate3d()</code><br />
	function as well, but it’s too complex to explain in a brief article like this one, so we’ll skip it.
</p>
<h4>Translation</h4>
<p>
	This is really just a fancy way of saying “movement.” The functions<br />
	<code>translateX()</code><br />
	,<br />
	<code>translateY()</code><br />
	and<br />
	<code>translateZ()</code><br />
	each take a length value, which moves the element by that distance along the given axis. So,<br />
	<code>translateX(2em)</code><br />
	would move the element 2 ems to the right, and<br />
	<code>translateZ(-10px)</code><br />
	would move the element 10 pixels away from the viewer. There’s also a shorthand function,<br />
	<code>translate3d()</code><br />
	, which takes three values in order, one for each axis, like so:<br />
	<code>translate3d(x, y, z)</code><br />
	.
</p>
<p>
	In <a href="http://provide.smashingmagazine.com/smashingmag-3d/example2.html">our second example</a>, we’ve translated each of the elements by -20 pixels along a different axis (in order: x, y, z).
</p>
<p>
	<a href="http://provide.smashingmagazine.com/smashingmag-3d/example2.html"><img src="http://coding.smashingmagazine.com/wp-content/uploads/2011/11/example2.jpg" alt="screenshot" width="500" /></a><br /> <em>Each element is translated by -20 pixels along a different axis: x (left), y (center) and z (right).</em>
</p>
<p>
	Note that translation of an element is similar to relative positioning, in that it doesn’t affect the document’s flow. The translated element will keep its position in the flow and will only <em>appear</em> to have moved, meaning it might cover or show through surrounding elements.
</p>
<h4>Scaling</h4>
<p>
	This just means making bigger or smaller. The three functions<br />
	<code>scaleX()</code><br />
	,<br />
	<code>scaleY()</code><br />
	and<br />
	<code>scaleZ()</code><br />
	each take a unitless number value, which is used as a multiplier. For<br />
	<code>scaleX()</code><br />
	and<br />
	<code>scaleY()</code><br />
	, this is applied directly to the width and height; for example, applying<br />
	<code>scaleY(1.5)</code><br />
	to an element with a height of 100 pixels would transform it to 150 pixels high, and applying<br />
	<code>scaleX(0.75)</code><br />
	to an element with a width of 100 pixels would transform it to 75 pixels wide.
</p>
<p>
	The<br />
	<code>scaleZ()</code><br />
	function behaves slightly differently. Transformed elements don’t actually have any depth to increase or decrease; what we’re doing is more like moving a 2-D object around in 3D space. Instead, the value given to<br />
	<code>scaleZ()</code><br />
	acts as a multiplier for the<br />
	<code>translateZ()</code><br />
	function that I explained in the last section. So, applying both<br />
	<code>translateZ(10px)</code><br />
	and<br />
	<code>scaleZ(2)</code><br />
	would translate an element 20 pixels along the z-axis.
</p>
<p>
	There’s also a shorthand property,<br />
	<code>scale3d()</code><br />
	, which, like<br />
	<code>translate3d()</code><br />
	, takes three values, one for each of the individual functions:<br />
	<code>scale3d(x,y,z)</code><br />
	. So, in the following code example, the same transformation applies to both of the elements:
</p>
<pre>.e1 {
   transform: scaleX(1.5) scaleY(1.5) scaleZ(0.75);
}

.e2 {
   transform: scale3d(1.5,1.5,0.75);
}</pre>
<h4>Perspective</h4>
<p>
	The<br />
	<code>perspective()</code><br />
	function is quite simple, but what it actually does is quite complex. The function takes a single value, which is a length unit greater than 0 (zero). Explaining this is a little complicated; the length is like a distance between you and the object that you’re viewing (a <a href="http://www.eleqtriq.com/2010/05/understanding-css-3d-transforms/">tutorial on Eleqtriq</a> has a more technical explanation and diagram). For our purposes, you just need to know that the lower the number, the more extreme the 3D effect will appear; any value below 200px, for example, will make the transformation appear very exaggerated, and any value of 1000px or more will seem to have no effect at all.
</p>
<p>
	In <a href="http://provide.smashingmagazine.com/smashingmag-3d/example3.html">our third example</a>, we have three transformed elements, each with a different value for the<br />
	<code>perspective()</code><br />
	function: 25px, 50px and 200px, respectively. Although the difference between the three is very discernible, it’s even clearer when you mouse over to see the transformations removed.
</p>
<p>
	<a href="http://provide.smashingmagazine.com/smashingmag-3d/example3.html"><img src="http://coding.smashingmagazine.com/wp-content/uploads/2011/11/example3.jpg" alt="screenshot" width="500" /></a><br /> <em>Each element has a different value for the <code>perspective()</code> function: 25px (left), 50px (center) and 200px (right).<br />
	</em>
</p>
<p>Note that I’ve transformed the parent elements (equally) so that we can see the degree of perspective more clearly; sometimes the difference in perspective values can be imperceptible.</p>
<h3>Other Properties</h3>
<p>
	In addition to<br />
	<code>transform</code><br />
	, you’ll need to know about a few other important properties.
</p>
<h4>transform-style</h4>
<p>
	If you’ll be applying 3D transformations to the children of an already transformed element, then you’ll need to use this property with the value<br />
	<code>preserve-3d</code><br />
	(the alternative, and default, is<br />
	<code>flat</code><br />
	). This means that the child elements will appear on their own planes; without it, they would appear flat in front of their parent.
</p>
<p>
	<a href="http://provide.smashingmagazine.com/smashingmag-3d/example4.html">Our fourth example</a> clearly illustrates the difference; the element on the left has the<br />
	<code>flat</code><br />
	value, and on the right,<br />
	<code>preserve-3d</code><br />
	.
</p>
<p>
	<a href="http://provide.smashingmagazine.com/smashingmag-3d/example4.html"><img class="alignnone size-full wp-image-116007" src="http://coding.smashingmagazine.com/wp-content/uploads/2011/11/example4.jpg" alt="screenshot" width="330" height="220" /></a><br /> <em>The element on the left has a <code>transform-style</code> value of <code>flat</code>, and the one on the right has a value of <code>preserve-3d</code>.<br />
	</em>
</p>
<p>
	Something else to note is that if you are transforming child elements, the parent must not have an<br />
	<code>overflow</code><br />
	value of<br />
	<code>hidden</code><br />
	; this would also force the children into appearing on the same plane.
</p>
<h4>transform-origin</h4>
<p>
	As mentioned, when you apply a transformation to an element, the change is applied around a point directly in the horizontal and vertical middle — like the imaginary piece of string we saw in the earlier illustration. Using<br />
	<code>transform-origin</code><br />
	, you can change this to any point in the element. Acceptable values are pairs of lengths, percentages or positional keywords (<br />
	<code>top</code><br />
	,<br />
	<code>right</code><br />
	, etc.). For example:
</p>
<pre>div {
   transform-origin: right top;
}</pre>
<p>
	In <a href="http://provide.smashingmagazine.com/smashingmag-3d/example5.html">our fifth example</a>, you can see the same transformations applied to two elements, each of which has a different<br />
	<code>transform-origin</code><br />
	value.
</p>
<p>
	<a href="http://provide.smashingmagazine.com/smashingmag-3d/example5.html"><img class="alignnone size-full wp-image-116007" src="http://coding.smashingmagazine.com/wp-content/uploads/2011/11/example5.jpg" alt="screenshot" width="355" height="215" /></a><br /> <em>The element on the left has a <code>transform-origin</code> value of <code>center center</code>, and the one on the right has a value of <code>right top</code>.<br />
	</em>
</p>
<p>The difference is clearly visible, but even more obvious if you pass the mouse over to see the transformation removed.</p>
<h4>backface-visibility</h4>
<p>
	Depending on which transformation functions you apply, sometimes you will move an element around until its front (or “face”) is angled away from you. When this happens, the default behavior is for the element to be shown in reverse; but if you use<br />
	<code>backface-visibility</code><br />
	with a value of<br />
	<code>hidden</code><br />
	, you’ll see nothing instead, not even a background color.
</p>
<h4>perspective and perspective-origin</h4>
<p>
	We introduced the<br />
	<code>perspective()</code><br />
	function earlier, but the<br />
	<code>perspective</code><br />
	property takes the same values; the difference is that the property applies only to the children of the element that it’s used on, not the element itself.
</p>
<p>
	The<br />
	<code>perspective-origin</code><br />
	property changes the angle from which you view the element that’s being transformed. Like<br />
	<code>transform-origin</code><br />
	, it accepts lengths, percentages or positional keywords, and the default position is the horizontal and vertical middle. The effect of changing the origin will be more pronounced the lower the<br />
	<code>perspective</code><br />
	value is.
</p>
<h3>Conclusion</h3>
<p>
	By necessity, we’ve flown through the intricacies of the 3D transformations syntax, but hopefully I’ve whetted your appetite to try it out yourself. With a certain amount of care for older browser versions, you can implement these properties in your own designs right now. If you don’t believe me, compare the list of “More adventures” on <a href="http://thefeed.orange.co.uk/">The Feed</a> website that I built last year in a browser that supports 3D transforms and in one that doesn’t, and you’ll see what I mean.
</p>
<p>
	Some of the concepts used in 3D transforms can be quite daunting, but experimentation will soon make them clear to you in practice, so get ahold of a browser that supports them and start making some cool stuff. But please, be responsible: not <em>everything</em> on the Web needs to be in three dimensions!</p>
]]></content:encoded>
			<wfw:commentRss>http://geryit.com/blog/adventures-in-the-third-dimension/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>(Better) Tabs with Round Out Borders [by Chris Coyier]</title>
		<link>http://geryit.com/blog/better-tabs-with-round-out-borders-by-chris-coyier/</link>
		<comments>http://geryit.com/blog/better-tabs-with-round-out-borders-by-chris-coyier/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 21:24:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Css3]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Out-source]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://geryit.com/blog/?p=1280</guid>
		<description><![CDATA[The following is a guest post by Menno van Slooten. You might notice we&#8217;ve been down this road before, but I quite like Menno&#8217;s approach here. The end result proves you can get a little fancier with the design than I originally did, with borders, gradients, and shadows and while actually using less elements. A [...]]]></description>
			<content:encoded><![CDATA[<div class="explanation">
		The following is a guest post by <a href="http://www.mennovanslooten.nl/">Menno van Slooten</a>. You might notice we&#8217;ve been <a href="http://css-tricks.com/tabs-with-round-out-borders/">down this road before</a>, but I quite like Menno&#8217;s approach here. The end result proves you can get a little fancier with the design than I originally did, with borders, gradients, and shadows and while actually using less elements.
	</div>
<p>
		<img src="http://cdn.css-tricks.com/wp-content/uploads/2012/01/article-illustration-1.png" alt="" width="200" height="200" class="alignright size-full wp-image-15940">
	</p>
<p>
		A good-looking tab control usually has one feature that I&#8217;ve always found impossible to reproduce without images: borders that bend to the <em>outside</em> at the bottom of each tab. In this article I would like to show how you can use the CSS<br />
		<code>:before</code><br />
		and<br />
		<code>:after</code><br />
		pseudo elements to create this effect without using images. First, let&#8217;s start with some basic markup.
	</p>
<h3>The markup</h3>
<pre rel="HTML">
									<code>&lt;ul class="tabrow"&gt;
    &lt;li&gt;Lorem&lt;/li&gt;
    &lt;li&gt;Ipsum&lt;/li&gt;
    &lt;li class="selected"&gt;Sit amet&lt;/li&gt;
    &lt;li&gt;Consectetur adipisicing&lt;/li&gt;
&lt;/ul&gt;</code>
								</pre>
<p>This would be about as basic as you can get. Not a lot of elements to work with here, but it will do.</p>
<h3>Getting started</h3>
<p>
		To get started, let&#8217;s get rid of the default<br />
		<code>&lt;ul&gt;</code><br />
		and<br />
		<code>&lt;li&gt;</code><br />
		styling and get these babies in line.
	</p>
<div id="example-1" class="example">
<ul class="tabrow">
<li>Lorem</li>
<li>Ipsum</li>
<li class="selected">Sit amet</li>
<li>Consectetur adipisicing</li>
</ul></div>
<pre rel="CSS">
									<code>.tabrow {
    text-align: center;
    list-style: none;
    margin: 0;
    padding: 0;
    line-height: 24px;
}
.tabrow li {
    margin: 0 10px;
    padding: 0 10px;
    border: 1px solid #AAA;
    background: #ECECEC;
    display: inline-block;
}</code>
								</pre>
<h3>Selecting a tab</h3>
<p>The selected tab should of course be clearly visible.</p>
<div id="example-2" class="example">
<ul class="tabrow">
<li>Lorem</li>
<li>Ipsum</li>
<li class="selected">Sit amet</li>
<li>Consectetur adipisicing</li>
</ul></div>
<pre rel="CSS">
									<code>.tabrow li.selected {
    background: #FFF;
    color: #000;
}</code>
								</pre>
<h3>Getting to the bottom of things</h3>
<p>Every tab control needs a well-defined bottom edge. It won&#8217;t do much now, but later it will help emphasize the effect of the selected tab being on top.</p>
<div id="example-3" class="example">
<ul class="tabrow">
<li>Lorem</li>
<li>Ipsum</li>
<li class="selected">Sit amet</li>
<li>Consectetur adipisicing</li>
</ul></div>
<pre rel="CSS">
									<code>.tabrow {
    position: relative;
}
.tabrow:after {
    position: absolute;
    content: "";
    width: 100%;
    bottom: 0;
    left: 0;
    border-bottom: 1px solid #AAA;
    z-index: 1;
}</code>
								</pre>
<p>
		Here we introduced our first<br />
		<code>:after</code><br />
		pseudo-element. Basically,<br />
		<code>:after</code><br />
		appends another child to an element. It&#8217;s not in the DOM (which is why it&#8217;s called a <em>pseudo</em> element), so it is not a real child but it is completely stylable, as long as you add some<br />
		<code>content</code><br />
		, in this case a single space character.
	</p>
<p>
		In my opinion, the terms<br />
		<code>:before</code><br />
		and<br />
		<code>:after</code><br />
		are slightly confusing since the pseudo&#8217;s aren&#8217;t actually added before or after the element they apply to, but are inserted as children. This is also why you can&#8217;t apply<br />
		<code>:before</code><br />
		and<br />
		<code>:after</code><br />
		to elements that can&#8217;t contain children (&#8220;no content&#8221; elements), like<br />
		<code>&lt;input&gt;</code><br />
		.
	</p>
<p>
		In this case, we use the pseudo element to create a bottom border that doesn&#8217;t influence the tabs&#8217; positioning. We could have just put a bottom border on the<br />
		<code>&lt;ul&gt;</code><br />
		but that would&#8217;ve made the next step a little trickier.
	</p>
<h3>Above and beyond</h3>
<p>
		Now, an essential part of a convincing looking tab control, is that the selected tab sits <em>in front of</em> the edge while the rest fall behind the edge. To do this, we change its bottom border and do some<br />
		<code>z-index</code><br />
		magic.
	</p>
<div id="example-4" class="example">
<ul class="tabrow">
<li>Lorem</li>
<li>Ipsum</li>
<li class="selected">Sit amet</li>
<li>Consectetur adipisicing</li>
</ul></div>
<pre rel="CSS">
									<code>.tabrow:before {
    z-index: 1;
}
.tabrow li {
    position: relative;
    z-index: 0;
}
.tabrow li.selected {
    z-index: 2;
    border-bottom-color: #FFF;
}</code>
								</pre>
<h3>Around the bends</h3>
<p>
		It is now time to add the elusive border that bends to the outside and we&#8217;ll use<br />
		<code>:before</code><br />
		and<br />
		<code>:after</code><br />
		for this. Let&#8217;s take this step by step and first just put everything in position.
	</p>
<div id="example-5" class="example">
<ul class="tabrow">
<li>Lorem</li>
<li>Ipsum</li>
<li class="selected">Sit amet</li>
<li>Consectetur adipisicing</li>
</ul></div>
<pre rel="CSS">
									<code>.tabrow li:before,
.tabrow li:after {
    position: absolute;
    bottom: -1px;
    width: 6px;
    height: 6px;
    content: " ";
}
.tabrow li:before {
    left: -6px;
}
.tabrow li:after {
    right: -6px;
}
.tabrow li:after, .tabrow li:before {
    border: 1px solid #AAA;
}</code>
								</pre>
<h3>Don&#8217;t be such a square</h3>
<p>You can probably see where this is going. Let&#8217;s remove the borders we don&#8217;t want and add some rounded corners.</p>
<div id="example-6" class="example">
<ul class="tabrow">
<li>Lorem</li>
<li>Ipsum</li>
<li class="selected">Sit amet</li>
<li>Consectetur adipisicing</li>
</ul></div>
<pre rel="CSS">
									<code>.tabrow li {
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}
.tabrow li:before {
    border-bottom-right-radius: 6px;
    border-width: 0 1px 1px 0;
}
.tabrow li:after {
    border-bottom-left-radius: 6px;
    border-width: 0 0 1px 1px;
}</code>
								</pre>
<h3>Cutting corners</h3>
<p>
		<img src="http://cdn.css-tricks.com/wp-content/uploads/2012/01/article-illustration-2.png" alt="" width="200" height="104" class="alignright size-full wp-image-15952">
	</p>
<p>There&#8217;s something not quite right about this result. Let&#8217;s look at it up close. As you can see both the original straight corner as well as the rounded corner are visible. We need to somehow get rid of the straight corner. To do that, we will cover it up with a shadow. To illustrate what&#8217;s going on, let&#8217;s make the shadow stand out a little bit.</p>
<div id="example-7" class="example">
<ul class="tabrow">
<li>Lorem</li>
<li>Ipsum</li>
<li class="selected">Sit amet</li>
<li>Consectetur adipisicing</li>
</ul></div>
<pre rel="CSS">
									<code>.tabrow li:before {
    box-shadow: 2px 2px 0 red;
}
.tabrow li:after {
    box-shadow: -2px 2px 0 red;
}</code>
								</pre>
<h3>Almost there</h3>
<p>
		<img src="http://cdn.css-tricks.com/wp-content/uploads/2012/01/article-illustration-3.png" alt="" width="200" height="104" class="alignright size-full wp-image-15953">
	</p>
<p>As you can see, the red shadows completely cover up the square corners we would like to hide. If we give the shadow the correct colors the illusion is complete.</p>
<div id="example-8" class="example">
<ul class="tabrow">
<li>Lorem</li>
<li>Ipsum</li>
<li class="selected">Sit amet</li>
<li>Consectetur adipisicing</li>
</ul></div>
<pre rel="CSS">
									<code>.tabrow li:before {
    box-shadow: 2px 2px 0 #ECECEC;
}
.tabrow li:after {
    box-shadow: -2px 2px 0 #ECECEC;
}
.tabrow li.selected:before {
    box-shadow: 2px 2px 0 #FFF;
}
.tabrow li.selected:after {
    box-shadow: -2px 2px 0 #FFF;
}</code>
								</pre>
<h3>Pieces of flair</h3>
<p>All that&#8217;s left to do now is adding a sprinkling of gradients and shadows to spice it up just a little bit.</p>
<div id="example-9" class="example">
<ul class="tabrow">
<li>Lorem</li>
<li>Ipsum</li>
<li class="selected">Sit amet</li>
<li>Consectetur adipisicing</li>
</ul></div>
<pre rel="CSS">
									<code>.tabrow li {
    background:      -o-linear-gradient(top, #ECECEC 50%, #D1D1D1 100%);
    background:     -ms-linear-gradient(top, #ECECEC 50%, #D1D1D1 100%);
    background:    -moz-linear-gradient(top, #ECECEC 50%, #D1D1D1 100%);
    background: -webkit-linear-gradient(top, #ECECEC 50%, #D1D1D1 100%);
    background: linear-gradient(top, #ECECEC 50%, #D1D1D1 100%);
    box-shadow: 0 3px 3px rgba(0, 0, 0, 0.4), inset 0 1px 0 #FFF;
    text-shadow: 0 1px #FFF;
    margin: 0 -5px;
    padding: 0 20px;
}</code>
								</pre>
<p>
		If you&#8217;re wondering about browser compatibility, it&#8217;s exactly as you&#8217;d expect: everything but IE. It&#8217;s very possible that it&#8217;ll work in IE10, but I haven&#8217;t had the chance to test with a preview release. Since IE8 and IE9 do support<br />
		<code>:before</code><br />
		and<br />
		<code>:after</code><br />
		but not<br />
		<code>border-radius</code><br />
		you&#8217;ll have to create a <a href="http://css-tricks.com/how-to-create-an-ie-only-stylesheet/">separate stylesheet</a> for them if you want to give their users a nice visual experience.
	</p>
<p>
		<a class="button" href="http://css-tricks.com/examples/RoundOutTabs2/">View Demo</a> &nbsp; <a class="button" href="http://css-tricks.com/examples/RoundOutTabs2.zip">Download Files</a>
	</p>
<p>
		<strong>Editor&#8217;s note:</strong> I added anchor links inside the tabs in the demo since I think it&#8217;s the most likely case that tabbed navigation like this have them. Most likely, they would have an<br />
		<code>href</code><br />
		attribute that would link to the content they go with by<br />
		<code>id</code><br />
		, and that behavior would be controlled by JavaScript. The fact that this tutorial doesn&#8217;t need the anchor links for the extra pseudo elements is further testament to it being better than my original.
	</p>
]]></content:encoded>
			<wfw:commentRss>http://geryit.com/blog/better-tabs-with-round-out-borders-by-chris-coyier/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Textarea Auto Resize [by ImpressiveWebs]</title>
		<link>http://geryit.com/blog/textarea-auto-resize-by-impressivewebs/</link>
		<comments>http://geryit.com/blog/textarea-auto-resize-by-impressivewebs/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 00:38:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Css3]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Jquery]]></category>
		<category><![CDATA[Out-source]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://geryit.com/blog/?p=1268</guid>
		<description><![CDATA[On a current project, I was trying to find a way to auto-resize a textarea according to some content that would be loaded in dynamically via Ajax. I didn’t know the height of the content and the textarea element doesn’t resize naturally like other HTML elements, so I needed to update the height of the [...]]]></description>
			<content:encoded><![CDATA[<div class="entry-content">
<p><img class="article_image alignleft" title="Textarea Auto Resize" src="http://cdn.impressivewebs.com/2012-01/textarea-auto-resize.jpg" alt="Textarea Auto Resize" width="184" height="184" />On a current project, I was trying to find a way to auto-resize a textarea according to some content that would be loaded in dynamically via Ajax. I didn’t know the height of the content and the textarea element doesn’t resize naturally like other HTML elements, so I needed to update the height of the element with JavaScript each time the content changed.</p>
<p>It seemed like a simple task. After doing a search to see what types of plugins and scripts were floating around to do this, the examples I found seemed a little overly complex. While most solutions seemed to incorporate some complex math calculations, I thought of a better way.</p>
<h2>Using a Hidden Clone Element</h2>
<p>A<br />
<code>&lt;div&gt;</code><br />
element will naturally stretch to fit the height of its content (assuming no floats or absolutely positioned elements are involved). So to get the height of the textarea, I just need to do the following:</p>
<ul class="body_text">
<li>Grab the content loaded into the textarea</li>
<li>Create an invisible clone div</li>
<li>Give the clone the same width and typographical properties as the textarea</li>
<li>Place the content into the clone</li>
<li>Get the height of the clone</li>
<li>Apply the height of the clone to the height of the textarea</li>
</ul>
<h2>The Code</h2>
<p>One of the keys to this solution is the CSS. As mentioned, the invisible clone needs to have the same typographical properties as the textarea. Not only does this include stuff line<br />
<code>font-size</code><br />
and<br />
<code>font-family</code><br />
, but also the<br />
<code>white-space</code><br />
and<br />
<code>word-wrap</code><br />
properties of the clone need to be set to mimic what happens inside the textarea.</p>
<p>First here’s the CSS for the textarea:</p>
<pre class="css">textarea {
    width: 500px;
    min-height: 50px;
    font-family: Arial, sans-serif;
    font-size: 13px;
    color: #444;
    padding: 5px;
}

.noscroll {
    overflow: hidden;
}</pre>
<p>Take note that I’ve added a separate class with<br />
<code>overflow: hidden</code><br />
, to prevent scrollbars from appearing. Normally this would not be a good thing to add to a textarea element, but because I’ll be resizing it with JavaScript, it’s fine. This class will be added to the textarea with JavaScript, to ensure that if JavaScript is turned off, the textarea will scroll normally.</p>
<p>Here is the CSS I’ll be applying to the hidden clone element:</p>
<pre class="php">.hiddendiv {
    display: none;
    white-space: pre-wrap;
    width: 500px;
    min-height: 50px;
    font-family: Arial, sans-serif;
    font-size: 13px;
    padding: 5px;
    word-wrap: break-word;
}</pre>
<p>A quick break-down: First, I set it to<br />
<code>display: none</code><br />
because I don’t want it visible to the user. I believe this should be fine for screen readers, because I don’t want it read out to them either. If anyone has a better solution for hiding it for assistive devices, let me know.</p>
<p>I’ve also set the<br />
<code>white-space</code><br />
property to a value of “pre-wrap”. This ensures that lines will wrap correctly, but everything else gets pre-formatted. I’ve also set the width to be equal to the textarea, and duplicated a few typographical properties. In both examples, I’m giving the clone and the textarea a<br />
<code>min-height</code><br />
so it will always start out at a standard, usable height.</p>
<p>Now for the JavaScript (which is using jQuery, <a href="http://www.impressivewebs.com/why-use-jquery-simple-tutorials/">sorry</a>):</p>
<pre class="js">$(function() {
	var txt = $('#comments'),
	hiddenDiv = $(document.createElement('div')),
	content = null;

	txt.addClass('noscroll');
	hiddenDiv.addClass('hiddendiv');

	$('body').append(hiddenDiv);

	txt.bind('keyup', function() {

	    content = txt.val();
	    content = content.replace(/\n/g, '&lt;br&gt;');
	    hiddenDiv.html(content);

	    txt.css('height', hiddenDiv.height());

	});
});</pre>
<p>This code assumes we’re targeting a single textarea element on the page. If you need this to affect more than one element, then just change the first line inside the function that defines the element we’re working with.</p>
<p>I’m dynamically changing the height based on jQuery’s<br />
<code>keyup</code><br />
event. You could easily change this to respond to an Ajax request instead, if you happen to be loading the content that way.</p>
<p>Using<br />
<code>keyup</code><br />
, however, is a good solution because it’s the most likely reason that you’ll want to auto-resize a textarea — user-entered data.</p>
<h2>What About IE6-8?</h2>
<p>I almost didn’t write this article, because the code wasn’t working at all in IE6-8. The reason for this had to do with the <a href="http://www.quirksmode.org/bugreports/archives/2004/11/innerhtml_and_t.html">poor way IE handles grabbing content using innerHTML</a>. So after I had written this simple solution that seemed to work in all the newer browsers, I came across <a href="http://javascriptly.com/examples/jquery-grab-bag/autogrow-textarea.html" rel="nofollow">this jQuery plugin</a>. That solution uses the exact same method that I’m using (the cloned element), and it worked (mostly) in IE.</p>
<p>So the line that I borrowed from that example that (mostly) fixed mine in IE was:</p>
<pre class="js">// fixes the IE innerHTML problem
content = content.replace(/\n/g, '&lt;br&gt;');</pre>
<p>But even after adding this line, there was still an issue: Long, unbroken strings of text wouldn’t affect the height of the textarea (which isn’t a big problem, really). A simple fix was adding<br />
<code>word-wrap: break-word</code><br />
to the CSS for the clone element.</p>
<h2>Bugs? Problems?</h2>
<p>Like the other solutions floating around, this could easily be turned into a plugin. In that case, I’d have to add a little more jQuery so that the characteristics of the clone element aren’t dependent on the CSS. Also, if the width of the textarea is fluid, then you’d have to use jQuery to grab that, and then apply it to the clone.</p>
<p>The solution I linked to in the previous section is just about perfect — you just need to add the<br />
<code>word-wrap</code><br />
fix that I mentioned.</p>
<p>For a demo, you can view my JSFiddle using the link below. Just be sure to hit the “run” button before you test it. Let me know if you find any problems with it.</p>
<div class="button_holder">
<ul class="button">
<li><a title="View Demo" href="http://jsfiddle.net/ImpressiveWebs/fGNNT/16/">View Demo</a></li>
</ul>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://geryit.com/blog/textarea-auto-resize-by-impressivewebs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorials and snippets to get started with CoffeeScript [by CatsWhoCode]</title>
		<link>http://geryit.com/blog/tutorials-and-snippets-to-get-started-with-coffeescript-by-catswhocode/</link>
		<comments>http://geryit.com/blog/tutorials-and-snippets-to-get-started-with-coffeescript-by-catswhocode/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 20:29:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Out-source]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://geryit.com/blog/?p=1256</guid>
		<description><![CDATA[Tutorials and snippets to get started with CoffeeScript Published on January 9th, 2012 by Jean-Baptiste Jung. 0 Comments - JavaScript is definitely an important part of a website as it allow the developer to interact directly with the web browser. Since 2005, lots of new JavaScript techniques and tools such as Ajax and jQuery became [...]]]></description>
			<content:encoded><![CDATA[<article class="post-4657 post type-post status-publish format-standard hentry category-javascript-2" id="post-4657">
<header>
<h2 class="title">
			<a href="http://www.catswhocode.com/blog/tutorials-and-snippets-to-get-started-with-coffeescript" rel="bookmark" title="Permanent Link to Tutorials and snippets to get started with CoffeeScript">Tutorials and snippets to get started with CoffeeScript</a><br />
		</h2>
<p class="meta">
			<time datetime="2012-01-09">Published on January 9th, 2012</time><br />
			<span class="author">by Jean-Baptiste Jung</span>. <a class="comment" href="http://www.catswhocode.com/blog/tutorials-and-snippets-to-get-started-with-coffeescript#comments">0 Comments</a> -
		</p>
<p><p>JavaScript is definitely an important part of a website as it allow the developer to interact directly with the web browser. Since 2005, lots of new JavaScript techniques and tools such as Ajax and jQuery became extremely popular and made the web a better place. Today, I&#8217;m introducing to you CoffeeScript, a new language that make JavaScript better and simpler.</p>
</p>
</header>
<h2>What is CoffeeScript?</h2>
<p>To keep it simple, CoffeeScript is a little language that compiles into JavaScript. If you ever coded in languages such as Python or Ruby, you&#8217;ll probably love CoffeeScript a lot. Instead of awkward braces and semicolons, JavaScript has always had a gorgeous object model at its heart.</p>
<p>The code compiles one-to-one into the equivalent JS, and there is no interpretation at runtime. You can use any existing JavaScript library seamlessly from CoffeeScript (and vice-versa). The compiled output is readable and pretty-printed, passes through JavaScript Lint without warnings, will work in every JavaScript implementation, and tends to run as fast or faster than the equivalent handwritten JavaScript.</p>
<h2>Installing CoffeeScript</h2>
<p>
		Installing CoffeeScript is not hard at all. The first thing to do is to make sure that you already installed a working copy of the latest stable version of <a href="http://nodejs.org/">Node.js</a> as well as <a href="http://npmjs.org/">npm</a>, the Node Package Manager.
	</p>
<p>Once done, you can install CoffeeScript by running the following command:</p>
<pre>npm install -g coffee-script</pre>
<p>
		CoffeeScript is now installed. Next step is to compile a<br />
		<code>.coffee</code><br />
		file into a<br />
		<code>.js</code><br />
		file. Use the following syntax to do so:
	</p>
<pre>coffee --compile example.coffee</pre>
<p>
		<a href="http://coffeescript.org/">CoffeeScript.org</a> is the official website of the CoffeeScript language. Don&#8217;t hesitate to visit it, it&#8217;s full of helpful ressources.
	</p>
<h2>Tutorial: Basics of CoffeeScript</h2>
<p>
		<img src="http://www.catswhocode.com/blog/wp-content/uploads/2012/01/coffeescript-tutorial-1.png" alt="" /><br /> A great tutorial that demonstrate all you need to get started with CoffeeScript: installation, configuration and first lines of codes.<br /> <strong>&rarr; <a href="http://sixrevisions.com/javascript/coffeescript-basics/">View tutorial</a></strong>
	</p>
<h2>Tutorial: Rocking out with CoffeeScript</h2>
<p>
		<img src="http://www.catswhocode.com/blog/wp-content/uploads/2012/01/coffeescript-tutorial-2.png" alt="" /><br /> A very complete tutorial that will make you a real CoffeeScript coder: it will show you how to write your code, how to indent, how to use classes, conditionnal statements and more.<br /> <strong>&rarr; <a href="http://net.tutsplus.com/tutorials/javascript-ajax/rocking-out-with-coffeescript/">View tutorial</a></strong>
	</p>
<h2>Tutorial: Creating an iOS-like Home Screen with CoffeeScript</h2>
<p>
		<img src="http://www.catswhocode.com/blog/wp-content/uploads/2012/01/coffeescript-tutorial-3.png" alt="" /><br /> Now, let&#8217;s code something concrete: this tutorial will show you how to create an iOS-like home screen, using CoffeeScript. A great way to learn by the example.<br /> <strong>&rarr; <a href="http://tutorialzine.com/2011/10/ios-homescreen-coffeescript/">View tutorial</a></strong>
	</p>
<h2>CoffeeScript snippet: Shorten url using Google&#8217;s Goo.gl service</h2>
<p>Short urls are very useful, especially on social networking sites like Twitter. Want to be able to create your own short urls using Google goo;gl service? No problem, just use the following code. Please note that you&#8217;ll need your own Google API key for the code to work.</p>
<pre>
apikey = &quot;YOUR GOOGLE API KEY GOES HERE&quot;

shorten_url = (url, success_callback, error_callback) -&gt;

  xhr = Titanium.Network.createHTTPClient()
  xhr.open &quot;POST&quot;, &quot;https://www.googleapis.com/urlshortener/v1/url?key=&quot; + apikey
  xhr.setRequestHeader &quot;Content-type&quot;, &quot;application/json&quot;
  xhr.onload = () -&gt; success_callback xhr.status, xhr.responseText
  xhr.onerror = () -&gt; error_callback xhr.status, xhr.responseText
  content =  &quot;{\&quot;longUrl\&quot;: \&quot;#{url}\&quot;}&quot;
  xhr.send content
</pre>
<p>
		<strong>&rarr; Source: <a href="http://developer.appcelerator.com/question/125880/coffeescript-snippet-for-accessing-googles-url-shortening-service-not-actually-a-question">http://developer.appcelerator.com/question/125880/&#8230;</a></strong>
	</p>
<h2>CoffeScript snippet: Read in a file</h2>
<p>CoffeeScript make reading files very easy, as shown below:</p>
<pre>fs.readFile 'data.txt', (err, data) -> fileText = data</pre>
<p>
		<strong>&rarr; Source: <a href="http://ricardo.cc/2011/06/02/10-CoffeeScript-One-Liners-to-Impress-Your-Friends.html">http://ricardo.cc/2011/06/02/10-CoffeeScript-One-Liners-to-Impress-Your-Friends.html</a></strong>
	</p>
<h2>CoffeScript snippet: Fetch and Parse a XML web service</h2>
<p>Fetching and parsing XML or .json files from web services is quite common when coding modern web applications. Here is how you can do it using CoffeeScript:</p>
<pre>request.get { uri:'path/to/api.json', json: true }, (err, r, body) -> results = body</pre>
<p>
		<strong>&rarr; Source: <a href="http://ricardo.cc/2011/06/02/10-CoffeeScript-One-Liners-to-Impress-Your-Friends.html">http://ricardo.cc/2011/06/02/10-CoffeeScript-One-Liners-to-Impress-Your-Friends.html</a></strong>
	</p>
<h2>CoffeeScript snippet: Finding substrings</h2>
<p>Another very common task, made easier with CoffeeScript:</p>
<pre>
message = "This is a test string. This has a repeat or two. This might even have a third."
message.indexOf "This", 0
</pre>
<p>
		<strong>&rarr; Source: <a href="http://coffeescriptcookbook.com/chapters/strings/finding-substrings">http://coffeescriptcookbook.com/chapters/strings/finding-substrings</a></strong>
	</p>
</article>
]]></content:encoded>
			<wfw:commentRss>http://geryit.com/blog/tutorials-and-snippets-to-get-started-with-coffeescript-by-catswhocode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Create Custom Taxonomies In WordPress [Smashingmag]</title>
		<link>http://geryit.com/blog/how-to-create-custom-taxonomies-in-wordpress-smashingmag/</link>
		<comments>http://geryit.com/blog/how-to-create-custom-taxonomies-in-wordpress-smashingmag/#comments</comments>
		<pubDate>Sat, 07 Jan 2012 20:49:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Out-source]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://geryit.com/blog/?p=1246</guid>
		<description><![CDATA[WordPress 3 introduced custom taxonomies as a core feature. The following release of 3.1 included many features to enhance support of custom taxonomies. Better import and export handling, advanced queries with tax_query , hierarchical support, body classes and a bunch of wonderful functions to play with were all part of the package. Let’s take an [...]]]></description>
			<content:encoded><![CDATA[<div id="prcontent" class="entry inner">
<p>
		WordPress 3 introduced custom taxonomies as a core feature. The following release of 3.1 included many features to enhance support of custom taxonomies. Better import and export handling, advanced queries with<br />
		<code>tax_query</code><br />
		, hierarchical support, body classes and a bunch of wonderful functions to play with were all part of the package.
	</p>
<p>Let’s take an in-depth look at how to create your own custom taxonomies in WordPress, including a few advanced development examples that you can begin using in your WordPress themes and plugins today.</p>
<p>
		<img src="http://media.smashingmagazine.com/wp-content/uploads/2012/01/wordpress-taxonomy-graphic.jpg" alt="Taxonomies: Bringing order to chaos in WordPress" width="550" height="300" />
	</p>
<div id="textadtarget"></div>
<h3>Taxonomies In WordPress</h3>
<p>
		WordPress’ custom taxonomies make it possible to structure large amounts of content in a logical, well-organized way. In WordPress, <strong>categories</strong> are set up as a hierarchal taxonomy, and <strong>tags</strong> are set up as a multifaceted taxonomy.
	</p>
<p>
		Taxonomy content can be displayed in a theme using <a href="http://codex.wordpress.org/Template_Hierarchy#Custom_Taxonomies_display">taxonomy templates</a>. Within a template, there are ample ways to display your data with <a href="http://codex.wordpress.org/Function_Reference#Category.2C_Tag_and_Taxonomy_Functions">built-in taxonomy functions</a>.
	</p>
<h4>Built-In Taxonomies</h4>
<p>WordPress offers four built-in taxonomies out of the box:</p>
<ol>
<li>Categories (hierarchal),</li>
<li>Tags (multifaceted),</li>
<li>Links (multifaceted),</li>
<li>Navigation menu (hierarchal).</li>
</ol>
<h4>Custom Taxonomies</h4>
<p>
		WordPress provides a new method of grouping content by allowing you to create your own custom taxonomies. The core developers have created the<br />
		<code>register_taxonomy()</code><br />
		function to handle the heavy lifting for us. All you have to do is understand how to configure all of the settings to suit your needs.
	</p>
<h3>A Practical Example: Content By Location</h3>
<p>
		A business that operates in multiple locations could benefit from organizing its content by location to allow visitors to browse news in their locality. A large news organization could organize its content by world region (Africa, Asia, Europe, Latin America, Middle East, US &#038; Canada), as the <a href="http://www.bbc.co.uk/news/world/">BBC</a> does in its “World” section.
	</p>
<p>
		<img src="http://media.smashingmagazine.com/wp-content/uploads/2012/01/bbc-location-taxonomy.jpg" alt="How the BBC uses a location taxonomy" width="550" height="270" />
	</p>
<h4>Create a Custom Taxonomy</h4>
<p>
		In WordPress, you can create (or “register”) a new taxonomy by using the<br />
		<code>register_taxonomy()</code><br />
		function. Each taxonomy option is <a href="http://codex.wordpress.org/Function_Reference/register_taxonomy">documented in detail in the WordPress Codex</a>.
	</p>
<p>
		<img src="http://media.smashingmagazine.com/wp-content/uploads/2012/01/wordpress-locations-post-taxonomy.jpg" alt="WordPress custom taxonomy: Posts by location" width="550" height="212" />
	</p>
<pre class="brush:php">
/**
 * Add custom taxonomies
 *
 * Additional custom taxonomies can be defined here
 * http://codex.wordpress.org/Function_Reference/register_taxonomy
 */
function add_custom_taxonomies() {
	// Add new "Locations" taxonomy to Posts
	register_taxonomy('location', 'post', array(
		// Hierarchical taxonomy (like categories)
		'hierarchical' => true,
		// This array of options controls the labels displayed in the WordPress Admin UI
		'labels' => array(
			'name' => _x( 'Locations', 'taxonomy general name' ),
			'singular_name' => _x( 'Location', 'taxonomy singular name' ),
			'search_items' =>  __( 'Search Locations' ),
			'all_items' => __( 'All Locations' ),
			'parent_item' => __( 'Parent Location' ),
			'parent_item_colon' => __( 'Parent Location:' ),
			'edit_item' => __( 'Edit Location' ),
			'update_item' => __( 'Update Location' ),
			'add_new_item' => __( 'Add New Location' ),
			'new_item_name' => __( 'New Location Name' ),
			'menu_name' => __( 'Locations' ),
		),
		// Control the slugs used for this taxonomy
		'rewrite' => array(
			'slug' => 'locations', // This controls the base slug that will display before each term
			'with_front' => false, // Don't display the category base before "/locations/"
			'hierarchical' => true // This will allow URL's like "/locations/boston/cambridge/"
		),
	));
}
add_action( 'init', 'add_custom_taxonomies', 0 );
</pre>
<p>
		After adding this to your theme’s<br />
		<code>functions.php</code><br />
		file, you should see a new taxonomy under the “Posts” menu in the admin sidebar. It works just like categories but is separate and independent.
	</p>
<p>
		<img src="http://media.smashingmagazine.com/wp-content/uploads/2012/01/wordpress-admin-locations-taxonomy-post-view.jpg" alt="WordPress custom taxonomy: Posts by location" width="550" height="176" />
	</p>
<p>After adding a few terms to your new taxonomy, you can begin to organize the content in your posts by location. A new “Locations” box will appear to the right of your posts in the WordPress admin area. Use this the way you would categories.</p>
<p>Let’s use this “location” taxonomy as a jumping-off point to learn more about working with taxonomy functions and content.</p>
<h4>Create a Taxonomy Template for Your Theme</h4>
<p>
		<img src="http://media.smashingmagazine.com/wp-content/uploads/2012/01/wordpress-taxonomy-theme-template-example.jpg" alt="Taxonomies: Bringing order to chaos in WordPress" width="419" height="348" />
	</p>
<p>
		When you add a custom taxonomy to a WordPress theme, you can display its content using one of <a href="http://codex.wordpress.org/Template_Hierarchy#Custom_Taxonomies_display">WordPress’ taxonomy theme templates</a>.
	</p>
<ul>
<li><code>taxonomy-{taxonomy}-{slug}.php</code><br /> We could use this to create a theme template for a particular location, such as <code>taxonomy-location-boston.php</code> for the term “boston.”</li>
<li><code>taxonomy-{taxonomy}.php</code><br /> If the taxonomy were <code>location</code>, WordPress would look for <code>taxonomy-location.php</code>.</li>
<li><code>taxonomy.php</code><br /> This template is used for all custom taxonomies.</li>
<li><code>archive.php</code><br /> If no taxonomy-specific template is found, then the taxonomy that lists pages will use the archive template.</li>
<li><code>index.php</code><br /> If no other template is found, then this will be used.</li>
</ul>
<p>
		Let’s use<br />
		<code>taxonomy-location.php</code><br />
		to display our content. The template file could look something like this:
	</p>
<pre class="brush:php">
&lt;?php
/**
 * Locations taxonomy archive
 */
get_header();
$term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );
?>
&lt;div class="wrapper">
	&lt;div class="primary-content">
		&lt;h1 class="archive-title">&lt;?php echo apply_filters( 'the_title', $term->name ); ?> News&lt;/h1>

		&lt;?php if ( !empty( $term->description ) ): ?>
		&lt;div class="archive-description">
			&lt;?php echo esc_html($term->description); ?>
		&lt;/div>
		&lt;?php endif; ?>

		&lt;?php if ( have_posts() ): while ( have_posts() ): the_post(); ?>

		&lt;div id="post-&lt;?php the_ID(); ?>" &lt;?php post_class('post clearfix'); ?>>
			&lt;h2 class="post-title">&lt;a href="&lt;?php the_permalink(); ?>" rel="bookmark">&lt;?php the_title(); ?>&lt;/a>&lt;/h2>
			&lt;div class="content clearfix">
				&lt;div class="post-info">
					&lt;p>&lt;?php the_time(get_option('date_format')); ?> by &lt;?php the_author_posts_link(); ?>&lt;/p>
				&lt;/div>&lt;!--// end .post-info -->
				&lt;div class="entry">
					&lt;?php the_content( __('Full story&hellip;') ); ?>
				&lt;/div>
			&lt;/div>
		&lt;/div>&lt;!--// end #post-XX -->

		&lt;?php endwhile; ?>

		&lt;div class="navigation clearfix">
			&lt;div class="alignleft">&lt;?php next_posts_link('&laquo; Previous Entries') ?>&lt;/div>
			&lt;div class="alignright">&lt;?php previous_posts_link('Next Entries &raquo;') ?>&lt;/div>
		&lt;/div>

		&lt;?php else: ?>

		&lt;h2 class="post-title">No News in &lt;?php echo apply_filters( 'the_title', $term->name ); ?>&lt;/h2>
		&lt;div class="content clearfix">
			&lt;div class="entry">
				&lt;p>It seems there isn't anything happening in &lt;strong>&lt;?php echo apply_filters( 'the_title', $term->name ); ?>&lt;/strong> right now. Check back later, something is bound to happen soon.&lt;/p>
			&lt;/div>
		&lt;/div>

		&lt;?php endif; ?>
	&lt;/div>&lt;!--// end .primary-content -->

	&lt;div class="secondary-content">
		&lt;?php get_sidebar(); ?>
	&lt;/div>&lt;!--// end .secondary-content -->

&lt;?php get_footer(); ?>
</pre>
<p>
		(Normally, we would <a href="http://codex.wordpress.org/Function_Reference/get_template_part">load a template part for the loop</a>, but for the sake of simplicity, I’ve skipped that step. As an alternative to<br />
		<code>get_term_by()</code><br />
		, we could use <a href="http://codex.wordpress.org/Function_Reference/single_term_title"><code>single_term_title()</code></a> and <a href="http://codex.wordpress.org/Function_Reference/term_description"><code>term_description()</code></a> on this taxonomy archive template to display or retrieve the title and description of the taxonomy term.)
	</p>
<p>
		In this example, we’ve used a function called<br />
		<code>get_term_by()</code><br />
		to retrieve all of the data associated with a taxonomy term in the form of an object. The object returned by the <a href="http://codex.wordpress.org/Function_Reference/get_term_by"><code>get_term_by()</code></a> function contains the following details about the term:
	</p>
<ul>
<li><code>ID</code><br /> 325</li>
<li><code>name</code><br /> Boston</li>
<li><code>slug</code><br /> boston</li>
<li><code>group</code><br /> 0</li>
<li><code>taxonomy</code><br /> location</li>
<li><code>taxonomy ID</code><br /> 325</li>
<li><code>description</code><br /> If you need to know the latest news in Boston, then look no further.</li>
<li><code>parent</code><br /> 0 (or the ID)</li>
<li><code>count</code><br /> 1 (i.e. the number of posts with this term selected)</li>
</ul>
<p>
		We’ve used this object, then, to display information about the current term<br />
		<code>name</code><br />
		and<br />
		<code>description</code><br />
		in the<br />
		<code>taxonomy-location.php</code><br />
		template.
	</p>
<h4>Using Taxonomy Conditionals</h4>
<p>Conditional tags can be used in WordPress to determine what content is displayed on a particular page depending on the conditions met by the page. Taxonomy templates have their own set of conditionals:</p>
<ul>
<li><code>is_tax()</code><br /> When any taxonomy archive page is being displayed.</li>
<li><code>is_tax( 'location' )</code><br /> When a taxonomy archive page for the “location” taxonomy is being displayed.</li>
<li><code>is_tax( 'location', 'boston')</code><br /> When the archive page for the “location” taxonomy with the slug of “boston” is being displayed.</li>
<li><code>is_tax( 'location', array( 'boston', 'new-york', 'philadelphia' ) )</code><br /> Returns <code>true</code> when the “location” taxonomy archive being displayed has a slug of either “boston,” “new-york” or “philadelphia.”</li>
<li><code>taxonomy_exists()</code><br /> When a particular taxonomy is registered via <code>register_taxonomy()</code>.</li>
</ul>
<h3>Working With Taxonomy Functions</h3>
<p>Many functions for working with taxonomies are available in WordPress. Let’s go through a few commons examples of how to use them in practice.</p>
<h4>Display a List of Taxonomy Terms</h4>
<p>
		Most navigation systems begin with an unordered list. You can generate an unordered list of links to taxonomy archive pages using the<br />
		<code>wp_list_categories()</code><br />
		function. This function is <a href="http://codex.wordpress.org/Template_Tags/wp_list_categories">very customizable</a> and can handle most of the scenarios that you’ll encounter as a theme developer.
	</p>
<pre class="brush:php">
/**
 * Create an unordered list of links to active location archives
 */
$locations_list = wp_list_categories( array(
  'taxonomy' => 'location',
  'orderby' => 'name',
  'show_count' => 0,
  'pad_counts' => 0,
  'hierarchical' => 1,
  'echo' => 0,
  'title_li' => 'Locations'
) );

// Make sure there are terms with articles
if ( $locations_list )
	echo '&lt;ul class="locations-list">' . $locations_list . '&lt;/ul>';
</pre>
<p>
		If you encounter a situation that requires a custom structure, I would recommend exploring the <a href="http://codex.wordpress.org/Function_Reference/Walker_Class">Walker class</a> or the<br />
		<code>wp_get_object_terms()</code><br />
		function.
	</p>
<h4>Create a Taxonomy Tag Cloud</h4>
<p>
		A tag cloud provides a great way for users to browse content. The<br />
		<code>wp_tag_cloud()</code><br />
		function makes creating a tag cloud with a custom taxonomy easy.
	</p>
<p>
		<img src="http://media.smashingmagazine.com/wp-content/uploads/2012/01/wordpress-taxonomy-term-cloud-example.jpg" alt="WordPress taxonomy term cloud example" width="347" height="189" />
	</p>
<p>Let’s use it to display a tag cloud of our location terms:</p>
<pre class="brush:php">
// Locations tag cloud
&lt;?php
$locations_cloud = wp_tag_cloud( array(
	'taxonomy' => 'location',
	'echo' => 0
) );

// Make sure there are terms with articles
if ( $locations_cloud ): ?>
&lt;h2>News by Location&lt;/h2>
&lt;div class="locations-cloud">
	&lt;?php echo $locations_cloud; ?>
&lt;/div>
&lt;?php endif; ?>
</pre>
<h4>Get All Terms in a Taxonomy</h4>
<p>
		You will often need to work with a full list of terms in a taxonomy, and the<br />
		<code>get_terms()</code><br />
		function can be quite handy for this. Let’s use it to show off the number of locations to which we’re providing news:
	</p>
<pre class="brush:php">
&lt;?php
// Get a list of all terms in a taxonomy
$terms = get_terms( "location", array(
	'hide_empty' => 0,
) );
$locations = array();
if ( count($terms) > 0 ):
	foreach ( $terms as $term )
		$locations[] = $term->name;

	$locations_str = implode(', ', $locations);
?>
&lt;h2&gt;Nationwide Coverage&lt;/h2&gt;
&lt;p&gt;We cover stories around the country in places like &lt;?php echo $locations_str; ?> and more. If we're not the best source for the latest news in your area, let us know!&lt;/p&gt;
&lt;?php endif; ?>
</pre>
<p>This will output the following HTML:</p>
<pre class="brush:xml">
&lt;h2&gt;Nationwide Coverage&lt;/h2&gt;
&lt;p&gt;We cover stories around the country in places like Boston, London, New York, San Francisco and more. If we're not the best source for the latest news in your area, let us know!&lt;/p&gt;
</pre>
<p>
		This simple approach may not show it, but the <a href="http://codex.wordpress.org/Function_Reference/get_terms"><code>get_terms()</code></a> function is incredibly powerful. It allows you to get terms from multiple taxonomies at once by passing an array that contains the names of your taxonomies as the first parameter.
	</p>
<h4>Working With WP_Query and tax_query</h4>
<p>
		The <a href="http://codex.wordpress.org/Class_Reference/WP_Query"><code>WP_Query</code> class</a> enables you to create a custom loop. WordPress 3.1 introduced a new parameter for the class called <a href="http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters"><code>tax_query</code></a>, which allows you to display content from a taxonomy in many unique ways.
	</p>
<p>Let’s use it to create a list of the most recent news posts in Boston.</p>
<pre class="brush:php">
&lt;?php
/**
 * Display a list of the most recent news in Boston
 *
 * @class WP_Query http://codex.wordpress.org/Class_Reference/WP_Query
 */
$locations_query = new WP_Query( array(
	'post_type' => 'post',
	'posts_per_page' => 10,
	'tax_query' => array(
		array(
			'taxonomy' => 'location',
			'field' => 'slug',
			'terms' => 'boston'
		)
	)
) );
// Display the custom loop
if ( $locations_query->have_posts() ): ?>
&lt;h2>Latest News in Boston&lt;/h2>
&lt;ul class="postlist">
	&lt;?php while ( $locations_query->have_posts() ) : $locations_query->the_post(); ?>
	&lt;li>&lt;span class="date">&lt;?php the_time(get_option('date_format')); ?>&lt;/span> &ndash; &lt;a href="&lt;?php the_permalink(); ?>" rel="bookmark">&lt;?php the_title(); ?>&lt;/a>&lt;/li>
	&lt;?php endwhile; wp_reset_postdata(); ?>
&lt;/ul>&lt;!--// end .postlist -->
&lt;?php endif; ?>
</pre>
<p>
		We could easily make this set-up dynamic by using the<br />
		<code>get_term_by()</code><br />
		or<br />
		<code>get_terms()</code><br />
		functions that we discussed earlier.
	</p>
<h3>Attaching Additional Data to a Taxonomy</h3>
<p>Each taxonomy term has specific data associated with it. Out of the box, WordPress allows you to store the following information for each taxonomy term:</p>
<ul>
<li>Name,</li>
<li>Slug,</li>
<li>Parent,</li>
<li>Description.</li>
</ul>
<p>
		But what if you need to store more information, such as an image for the taxonomy term or a title and description for search engines, or maybe even attach the term to a particular author the way a traditional news column does? Since WordPress 2.9, developers have been able to attach additional meta data to posts, pages, custom post types, comments and users using the<br />
		<code>add_metadata()</code><br />
		,<br />
		<code>update_metadata()</code><br />
		and<br />
		<code>get_metadata()</code><br />
		functions. But this does not include taxonomies such as tags and categories.
	</p>
<p>
		With the help of the <a href="http://wordpress.org/extend/plugins/taxonomy-metadata/">Taxonomy Metadata</a> plugin, we can attach meta data to taxonomy terms for both built-in and custom taxonomies. This enables us to create additional taxonomy fields that will be stored in a new<br />
		<code>taxonomymeta</code><br />
		database table.
	</p>
<p>
		<strong>Note to Multisite developers:</strong> I’ve encountered issues using the Taxonomy Metadata plugin on a WordPress Multisite installation. Activating the plugin network-wide results in data not being saved. Instead, activate the plugin individually for each website, and it will work properly.
	</p>
<p>
		(Knowing the story behind this technique and what it might mean for future WordPress upgrades is important. Currently, there is a <a href="http://core.trac.wordpress.org/ticket/10142">debate on the WordPress Trac project</a> about the best method for this. The method I’ll show you is one suggested by various WordPress core developers. But I strongly urge you to review the Trac project and the Codex. A standard approach could very well be built into WordPress in the future, which would therefore be more practical than what I am about to show you.)
	</p>
<p>
		The <strong>prerequisite</strong> to all of the examples below is to install and activate the <a href="http://wordpress.org/extend/plugins/taxonomy-metadata/">Taxonomy Metadata</a> plugin.
	</p>
<h4>Add Search Engine Title and Description Fields to Categories and Tags</h4>
<p>
		We will use action hooks to gracefully attach additional fields to our taxonomies without editing WordPress’ core. If you’ve made it this far, then you probably have a working knowledge of WordPress filters and actions. To learn about working with hooks, I highly suggest <a href="http://wp.smashingmagazine.com/2011/10/07/definitive-guide-wordpress-hooks/">Daniel Pataki’s article</a> on the subject.
	</p>
<p>
		<img src="http://media.smashingmagazine.com/wp-content/uploads/2012/01/wordpress-taxonomy-custom-fields-example.jpg" alt="WordPress taxonomy meta data: Search engine title and description fields added to categories and tags" width="549" height="952" />
	</p>
<p>
		Let’s start by adding a text<br />
		<code>input</code><br />
		and a<br />
		<code>textarea</code><br />
		field to the “Add New” and “Edit” term pages on the <a href="http://codex.wordpress.org/Administration_Screens">WordPress admin screen</a>. We do this by placing the following functions in our theme or plugin.
	</p>
<p>
		<strong>The <code>taxonomy_metadata_add()</code> function attaches the fields to the <code>/wp-admin/edit-tags.php?taxonomy=%taxonomy%</code> page.<br />
		</strong><br /> The<br />
		<code>%taxonomy%</code><br />
		item in the URL above will change depending on the term you are editing.
	</p>
<pre class="brush: php;">/**
 * Add additional fields to the taxonomy add view
 * e.g. /wp-admin/edit-tags.php?taxonomy=category
 */
function taxonomy_metadata_add( $tag ) {
	// Only allow users with capability to publish content
	if ( current_user_can( 'publish_posts' ) ): ?>
	&lt;div class="form-field">
		&lt;label for="meta_title">&lt;?php _e('Search Engine Title'); ?>&lt;/label>
		&lt;input name="meta_title" id="meta_title" type="text" value="" size="40" />
		&lt;p class="description">&lt;?php _e('Title display in search engines is limited to 70 chars'); ?>&lt;/p>
	&lt;/div>

	&lt;div class="form-field">
		&lt;label for="meta_description">&lt;?php _e('Search Engine Description'); ?>&lt;/label>
		&lt;textarea name="meta_description" id="meta_description" rows="5" cols="40">&lt;/textarea>
		&lt;p class="description">&lt;?php _e('The meta description will be limited to 156 chars by search engines.'); ?>&lt;/p>
	&lt;/div>
	&lt;?php endif;
}
</pre>
<p>
		<strong>The <code>taxonomy_metadata_edit()</code> function attaches the fields to the <code>/wp-admin/edit-tags.php?action=edit&#038;taxonomy=%taxonomy%&#038;tag_ID=%id%&#038;post_type=%post_type%</code> page.<br />
		</strong><br /> The<br />
		<code>%taxonomy%</code><br />
		,<br />
		<code>%id%</code><br />
		and<br />
		<code>%post_type%</code><br />
		items in the URL above will change depending on the term you are editing.
	</p>
<p>
		We’ll use the<br />
		<code>get_metadata</code><br />
		function here to display any saved data that exists in the form.
	</p>
<pre class="brush: php;">/**
 * Add additional fields to the taxonomy edit view
 * e.g. /wp-admin/edit-tags.php?action=edit&#038;taxonomy=category&#038;tag_ID=27&#038;post_type=post
 */
function taxonomy_metadata_edit( $tag ) {
	// Only allow users with capability to publish content
	if ( current_user_can( 'publish_posts' ) ): ?>
	&lt;tr class="form-field">
		&lt;th scope="row" valign="top">
			&lt;label for="meta_title">&lt;?php _e('Search Engine Title'); ?>&lt;/label>
		&lt;/th>
		&lt;td>
			&lt;input name="meta_title" id="meta_title" type="text" value="&lt;?php echo get_term_meta($tag->term_id, 'meta_title', true); ?>" size="40" />
			&lt;p class="description">&lt;?php _e('Title display in search engines is limited to 70 chars'); ?>&lt;/p>
		&lt;/td>
	&lt;/tr>

	&lt;tr class="form-field">
		&lt;th scope="row" valign="top">
			&lt;label for="meta_description">&lt;?php _e('Search Engine Description'); ?>&lt;/label>
		&lt;/th>
		&lt;td>
			&lt;textarea name="meta_description" id="meta_description" rows="5" cols="40">&lt;?php echo get_term_meta($tag->term_id, 'meta_description', true); ?>&lt;/textarea>
			&lt;p class="description">&lt;?php _e('Title display in search engines is limited to 70 chars'); ?>&lt;/p>
		&lt;/td>
	&lt;/tr>
	&lt;?php endif;
}
</pre>
<p>
		These two functions control the output of the form fields. I’ve used HTML that follows WordPress’ <a href="http://codex.wordpress.org/User:TECannon/UI_Pattern_and_Style_Guide">UI patterns and styles guidelines</a> for the admin area.
	</p>
<p>
		<strong>Saving the form’s data to the <code>taxonomymeta</code> database table<br />
		</strong><br /> Now that we’ve added the form fields, we’ll need to process and save the data with the<br />
		<code>update_term_meta</code><br />
		function that is provided by the plugin.
	</p>
<pre class="brush: php;">/**
 * Save taxonomy metadata
 *
 * Currently the Taxonomy Metadata plugin is needed to add a few features to the WordPress core
 * that allow us to store this information into a new database table
 *
 *	http://wordpress.org/extend/plugins/taxonomy-metadata/
 */
function save_taxonomy_metadata( $term_id ) {
	if ( isset($_POST['meta_title']) )
		update_term_meta( $term_id, 'meta_title', esc_attr($_POST['meta_title']) );

	if ( isset($_POST['meta_description']) )
		update_term_meta( $term_id, 'meta_description', esc_attr($_POST['meta_description']) );
}
</pre>
<p>
		<strong>Add the new taxonomy fields</strong><br /> Now that everything is in place, we’ll use action hooks to load our new functions in all the right places. By hooking the following function into the<br />
		<code>admin_init</code><br />
		action, we ensure that it runs only on the admin side of WordPress. First, we need to make sure that the functions added by the Taxonomy Metadata plugin are available. Next, we use the<br />
		<code>get_taxonomies()</code><br />
		function to attach the new taxonomy fields to every public taxonomy, including the built-in tags and categories.
	</p>
<pre class="brush: php;">/**
 * Add additional taxonomy fields to all public taxonomies
 */
function taxonomy_metadata_init() {
	// Require the Taxonomy Metadata plugin
	if( !function_exists('update_term_meta') || !function_exists('get_term_meta') ) return false;

	// Get a list of all public custom taxonomies
	$taxonomies = get_taxonomies( array(
		'public'   => true,
		'_builtin' => true
	), 'names', 'and');

	// Attach additional fields onto all custom, public taxonomies
	if ( $taxonomies ) {
		foreach ( $taxonomies  as $taxonomy ) {
			// Add fields to "add" and "edit" term pages
			add_action("{$taxonomy}_add_form_fields", 'taxonomy_metadata_add', 10, 1);
			add_action("{$taxonomy}_edit_form_fields", 'taxonomy_metadata_edit', 10, 1);
			// Process and save the data
			add_action("created_{$taxonomy}", 'save_taxonomy_metadata', 10, 1);
			add_action("edited_{$taxonomy}", 'save_taxonomy_metadata', 10, 1);
		}
	}
}
add_action('admin_init', 'taxonomy_metadata_init');
</pre>
<p>That’s it. We’re done!</p>
<p>You should now see two additional fields in your tags, categories and public custom taxonomies. As mentioned at the beginning of this section, the technique can be used to handle many different scenarios. This basic framework for storing and retrieving information associated with a taxonomy should have you well on your way to mastering the management of taxonomy content.</p>
<h3>In Conclusion</h3>
<p>I hope you better understand how to organize WordPress content with the help of taxonomies. Whether hierarchal or multifaceted, a well-implemented taxonomy will simplify the way content is organized and displayed on a website. WordPress has all of the tools you need to create custom taxonomies and to group your content in new and exciting ways. How you use them is up to you!</p>
<h4>Additional Resources</h4>
<ul>
<li><a href="http://codex.wordpress.org/Template_Hierarchy#Custom_Taxonomies_display">Custom taxonomy theme templates in WordPress</a></li>
<li>“<a href="http://justintadlock.com/archives/2009/05/06/custom-taxonomies-in-wordpress-28">Custom Taxonomies in WordPress 2.8</a>”
		</li>
<li>“<a href="http://justintadlock.com/archives/2010/06/10/a-refresher-on-custom-taxonomies">A Refresher on Custom Taxonomies</a>”
		</li>
<li><a href="http://codex.wordpress.org/Function_Reference/register_taxonomy">Official documentation on <code>register_taxonomy()</code><br />
		</a></li>
<li>“<a href="http://net.tutsplus.com/tutorials/wordpress/introducing-wordpress-3-custom-taxonomies/">Introducing WordPress 3 Custom Taxonomies</a>”
		</li>
<li>“<a href="http://www.wpmods.com/adding-metadata-taxonomy-terms/">Adding Meta Data to Taxonomy Terms</a>”
		</li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://geryit.com/blog/how-to-create-custom-taxonomies-in-wordpress-smashingmag/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Interconnected World of Tech Companies [INFOGRAPHIC]</title>
		<link>http://geryit.com/blog/the-interconnected-world-of-tech-companies-infographic/</link>
		<comments>http://geryit.com/blog/the-interconnected-world-of-tech-companies-infographic/#comments</comments>
		<pubDate>Sat, 23 Jul 2011 09:28:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cool Stuff]]></category>
		<category><![CDATA[Infographic]]></category>

		<guid isPermaLink="false">http://geryit.com/blog/?p=1189</guid>
		<description><![CDATA[Post Source The “tech world” is really more of a “tech family.” Between digital giants’ appetites for acquisitions and the tendency of their ex-employees to start new companies, it’s easy to see how nearly every blip in the ecosystem is closely related. We’ve mapped just a few of these family ties between “Xooglers,” the “PayPal [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://geryit.com/blog/wp-content/uploads/2011/07/mashable_infographic_interconnected-tech-companies.png" style="display:none;"/><br />
<h2>Post Source</h2>
<p><a href="http://mashable.com/"><img src="http://geryit.com/blog/wp-content/uploads/2011/07/Mashable_shadow_logo.png"/></a></p>
<p>The “tech world” is really more of a “tech family.” Between digital giants’ appetites for acquisitions and the tendency of their ex-employees to start new companies, it’s easy to see how nearly every blip in the ecosystem is closely related.</p>
<p>We’ve mapped just a few of these family ties between “Xooglers,” the “PayPal Mafia”, “Softies” and the many other tech connectors who have yet to be nicknamed.</p>
<p>Our guess is that if you gathered a handful of tech veterans in a room, you could keep the tech connection game going forever. So while this graphic is hardly exhaustive, we’ll keep it going in the comments — feel free to add connections to the list!</p>
<p><a href="http://geryit.com/blog/wp-content/uploads/2011/07/mashable_infographic_interconnected-tech-companies1.jpg"><img src="http://geryit.com/blog/wp-content/uploads/2011/07/mash.jpg"/></a></p>
]]></content:encoded>
			<wfw:commentRss>http://geryit.com/blog/the-interconnected-world-of-tech-companies-infographic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pure Css3 Custom Scrollbars</title>
		<link>http://geryit.com/blog/pure-css3-custom-scrollbars/</link>
		<comments>http://geryit.com/blog/pure-css3-custom-scrollbars/#comments</comments>
		<pubDate>Sat, 25 Jun 2011 17:35:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cool Stuff]]></category>
		<category><![CDATA[Css3]]></category>
		<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://geryit.com/blog/?p=1177</guid>
		<description><![CDATA[WebKit now supports styling of the scrollbars in overflow sections, listboxes, dropdown menus and textareas. Internet Explorer supported this feature after version 5.5 . Unfortunately Firefox still doesnt support custom scrollbars. Anyways, checkout the screenshots and style your scrollbars. DEMO DOWNLOAD Source Code &#60;doctype! html&#62; &#60;html&#62; &#60;head&#62; &#60;title&#62;Custom Css3 Scrollbars&#60;/title&#62; &#60;style&#62; body{ font-family: sans-serif; font-size:12px; [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://geryit.com/blog/wp-content/uploads/2011/06/custom-scrollbars.png"><img src="http://geryit.com/blog/wp-content/uploads/2011/06/custom-scrollbars.png" alt="" title="custom-scrollbars" width="120" height="70" class="alignnone size-full wp-image-1178" /></a></p>
<p><em>WebKit</em> now supports styling of the <i>scrollbars</i> in overflow sections, listboxes, dropdown menus and textareas. Internet Explorer supported this feature after version 5.5 . Unfortunately Firefox still doesnt support custom scrollbars. Anyways, checkout the screenshots and style your scrollbars.</p>
<p><img src="http://geryit.com/blog/wp-content/uploads/2011/06/custom-scrollbars-ssh1.png" alt="" title="custom-scrollbars-ssh1" width="388" height="184" class="alignnone size-full wp-image-1179" /><img src="http://geryit.com/blog/wp-content/uploads/2011/06/custom-scrollbars-ssh21.png" alt="" title="custom-scrollbars-ssh2" width="296" height="223" class="alignnone size-full wp-image-1182" /></p>
<p>
<a class="awesome launch" href="http://geryit.com/lib/custom-css3-scrollbars"><span>DEMO</span></a><br />
<a class="awesome" href="http://geryit.com/lib/custom-css3-scrollbars/custom-css3-scrollbars.zip"><span>DOWNLOAD</span></a>
</p>
<h3>Source Code</h3>
<pre class="brush:html" title="index.html">
&lt;doctype! html&gt;
&lt;html&gt;
	&lt;head&gt;
		&lt;title&gt;Custom Css3 Scrollbars&lt;/title&gt;
		&lt;style&gt;
			body{
				font-family: sans-serif;
				font-size:12px;
				background: #fff;
				overflow-y: hidden;
			}
			#widget{
				width: 300px;
				height:400px;
				overflow: auto;
			}
			::-webkit-scrollbar {
				width: 10px;
				height: 10px;
			}
			::-webkit-scrollbar-button:start:decrement,
			::-webkit-scrollbar-button:end:increment  {
				display: none;
			}

			::-webkit-scrollbar-track-piece  {
				background-color: #3b3b3b;
				-webkit-border-radius: 6px;
			}

			::-webkit-scrollbar-thumb:vertical {
				-webkit-border-radius: 6px;
				background: #666 url(scrollbar_thumb_bg.png) no-repeat center;
			}
		&lt;/style&gt;
	&lt;/head&gt;
	&lt;body&gt;
		&lt;div id=&quot;widget&quot;&gt;
			&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam id est sapien. Maecenas aliquam scelerisque eros quis luctus. Phasellus nisi lectus, tempus ut scelerisque in, adipiscing nec neque. Nullam ac metus eget lorem imperdiet luctus non in mauris. Maecenas porta ultricies sapien, non laoreet nisl accumsan egestas. Etiam viverra tincidunt euismod. Vestibulum dui massa, ultrices ac malesuada eu, varius quis ipsum. Nam tincidunt tempor nulla, id consequat velit hendrerit a. Fusce bibendum condimentum massa non fringilla. Ut sagittis, lorem eu varius tempus, nisl nisi aliquet odio, eu fringilla arcu arcu at lectus. Sed ligula magna, dapibus fringilla vestibulum quis, pulvinar vitae libero. Nunc tempor elementum magna, volutpat lacinia neque suscipit bibendum. Nunc vel pulvinar turpis. Etiam pretium malesuada nibh vel pellentesque.&lt;/p&gt;

			&lt;p&gt;Cras vitae justo arcu. Proin at tellus id libero adipiscing ornare. Aliquam pharetra consequat velit id mollis. Aenean imperdiet libero ut velit viverra eget posuere purus rhoncus. Vestibulum leo mi, malesuada nec commodo eget, condimentum sit amet urna. Nam sem lectus, pellentesque ut commodo eget, scelerisque porta diam. Suspendisse potenti. Curabitur in neque sem. Nullam molestie quam aliquet lorem convallis id semper nisi eleifend. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.&lt;/p&gt;
		&lt;/div&gt;
	&lt;/body&gt;
&lt;/html&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://geryit.com/blog/pure-css3-custom-scrollbars/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

