<?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>AEXT.NET MAGAZINE &#187; Wordpress Theme</title>
	<atom:link href="http://aext.net/tag/wordpress-theme/feed/" rel="self" type="application/rss+xml" />
	<link>http://aext.net</link>
	<description>How to Create a Website</description>
	<lastBuildDate>Wed, 30 May 2012 05:03:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>20 Awesome WordPress Typography Themes for Writers</title>
		<link>http://aext.net/2010/10/wordpress-typography-themes/</link>
		<comments>http://aext.net/2010/10/wordpress-typography-themes/#comments</comments>
		<pubDate>Mon, 11 Oct 2010 08:36:02 +0000</pubDate>
		<dc:creator>Lief</dc:creator>
				<category><![CDATA[Themes]]></category>
		<category><![CDATA[Minimalism]]></category>
		<category><![CDATA[typography]]></category>
		<category><![CDATA[Wordpress Theme]]></category>

		<guid isPermaLink="false">http://aext.net/?p=7132</guid>
		<description><![CDATA[<p><a href="http://aext.net/theme/platinoom" title="Platinoom - Premium WordPress Themes"><img src="http://aext.net/wp-content/uploads/2011/04/platinoom_wordpress_theme.png" alt="ThemeKiss" /></a></p><p style="float: right;"><a href="http://api.tweetmeme.com/share?url=http://aext.net/2010/10/wordpress-typography-themes/&service=su.pr&service_api=b57727e991c454bd2b2c62ff71462c79"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://aext.net/2010/10/wordpress-typography-themes/" height="61" width="51" /></a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://aext.net/theme/platinoom" title="Platinoom - Premium WordPress Themes"><img src="http://aext.net/wp-content/uploads/2011/04/platinoom_wordpress_theme.png" alt="ThemeKiss" /></a></p><p style="float: right;"><a href="http://api.tweetmeme.com/share?url=http://aext.net/2010/10/wordpress-typography-themes/&service=su.pr&service_api=b57727e991c454bd2b2c62ff71462c79"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://aext.net/2010/10/wordpress-typography-themes/" height="61" width="51" /></a></p><p>If you are a great writer who enjoys writing, you should find a great blog theme and let the content does action. In this case, there are no styles better than a minimal design which focuses on typography because the minimal style is more appropriate for the content and it’s audience.</p>
<p><img class="aligncenter size-full wp-image-7456" title="wptthee" src="http://aext.net/wp-content/uploads/2010/09/wptthee.jpg" alt="" width="500" height="249" /></p>
<p>I&#8217;m bringing you here the list of 20 best free <a href="http://themekiss.com">WordPress themes</a> that are best for typography and reader-respected if you are considering to go minimal for your upcoming writing WordPress blog.</p>
<p><span id="more-7132"></span></p>
<h3>The Arialist</h3>
<div class="bigimage"><a href="http://aext.net/wp-content/uploads/2010/09/thearialist.png"><img class="aligncenter size-medium wp-image-7133" title="thearialist wordpress theme" src="http://aext.net/wp-content/uploads/2010/09/thearialist-500x333.png" alt="thearialist wordpress theme" width="500" height="333" /></a></div>
<p><a href="http://www.mentariworks.com/Arialist/">Demo</a> &#8211; <a href="http://www.mentariworks.com/thearialist.html">Download</a></p>
<h3>theSevenFive</h3>
<div class="bigimage"><a href="http://aext.net/wp-content/uploads/2010/09/theSevenFive-Minimalist-Wordpress-Theme.jpg"><img class="aligncenter size-medium wp-image-7211" title="theSevenFive-Minimalist-Wordpress-Theme" src="http://aext.net/wp-content/uploads/2010/09/theSevenFive-Minimalist-Wordpress-Theme-500x262.jpg" alt="theSevenFive-Minimalist-Wordpress-Theme" width="500" height="262" /></a></div>
<p><a href="http://www.thesevenfive.com/">Demo</a> &#8211; <a href="http://www.press75.com/downloads/seven-five.zip">Download</a></p>
<h3>Charlene</h3>
<div class="bigimage"><a href="http://aext.net/wp-content/uploads/2010/09/006-Charlene.jpg"><img class="aligncenter size-medium wp-image-7438" title="006-Charlene" src="http://aext.net/wp-content/uploads/2010/09/006-Charlene-500x388.jpg" alt="" width="500" height="388" /></a></div>
<p><a href="http://papertreedesign.com/themes/">Demo</a> &#8211; <a href="http://papertreedesign.com/themes/downloadscharlene.zip">Download</a></p>
<h3>Lifestreaming White</h3>
<div class="bigimage"><a href="http://aext.net/wp-content/uploads/2010/09/005-Lifestreaming-White.jpg"><img class="aligncenter size-medium wp-image-7435" title="005-Lifestreaming-White" src="http://aext.net/wp-content/uploads/2010/09/005-Lifestreaming-White-500x309.jpg" alt="" width="500" height="309" /></a></div>
<p><a href="http://designs.project66.net/archives/12">Demo</a> &#8211; <a href="http://www.project66.net/lifestreaming-white/">Download</a></p>
<h3>Manifest</h3>
<div class="bigimage"><a href="http://aext.net/wp-content/uploads/2010/09/Manifest-Wordpress-Theme.jpg"><img class="aligncenter size-medium wp-image-7150" title="Manifest-Wordpress-Theme" src="http://aext.net/wp-content/uploads/2010/09/Manifest-Wordpress-Theme-500x337.jpg" alt="" width="500" height="337" /></a></div>
<p><a href="http://demo.jimbarraud.com/manifest/">Demo</a> &#8211; <a href="http://jimbarraud.com/manifest/">Download</a></p>
<h3>Wu Wei</h3>
<div class="bigimage"><a href="http://aext.net/wp-content/uploads/2010/09/007-Wu-Wei.jpg"><img class="aligncenter size-medium wp-image-7439" title="007-Wu-Wei" src="http://aext.net/wp-content/uploads/2010/09/007-Wu-Wei-500x258.jpg" alt="" width="500" height="258" /></a></div>
<p><a href="http://projects.equivocality.com/wu-wei/">Demo</a> &#8211; <a href="http://equivocality.com/wu-wei/">Download</a></p>
<h3>The Erudite</h3>
<div class="bigimage"><a href="http://aext.net/wp-content/uploads/2010/09/004-The-Erudite.jpg"><img class="aligncenter size-medium wp-image-7433" title="004-The-Erudite" src="http://aext.net/wp-content/uploads/2010/09/004-The-Erudite-500x376.jpg" alt="" width="500" height="376" /></a></div>
<p><a href="http://wordpress.org/extend/themes/the-erudite">Demo and Download</a></p>
<h3>Minimalist WordPress Portfolio</h3>
<div class="bigimage"><a href="http://aext.net/wp-content/uploads/2010/09/Minimalist-Wordpress-theme.jpg"><img class="aligncenter size-medium wp-image-7154" title="Minimalist-Wordpress-theme" src="http://aext.net/wp-content/uploads/2010/09/Minimalist-Wordpress-theme-500x286.jpg" alt="" width="500" height="286" /></a></div>
<p><a href="http://themeforest.net/item/minimal-wordpress-portfolio/full_screen_preview/54184?ref=prlamnguyen">Demo</a> &#8211; <a href="http://themeforest.net/item/minimal-wordpress-portfolio/54184?ref=prlamnguyen">Download</a></p>
<h3>Aqualine</h3>
<div class="bigimage"><a href="http://aext.net/wp-content/uploads/2010/09/Aqualine-Minimalist-Wordpress-Theme.jpg"><img class="aligncenter size-medium wp-image-7213" title="Aqualine-Minimalist-Wordpress-Theme" src="http://aext.net/wp-content/uploads/2010/09/Aqualine-Minimalist-Wordpress-Theme-500x229.jpg" alt="Aqualine-Minimalist-Wordpress-Theme" width="500" height="229" /></a></div>
<p><a href="http://www.theforge.co.za/aqualine-demo/">Demo</a> &#8211; <a href="http://www.onextrapixel.com/2010/05/27/aqualine-a-free-minimalist-wordpress-theme/">Download</a></p>
<h3>Typominima</h3>
<div class="bigimage"><a href="http://aext.net/wp-content/uploads/2010/09/008-Typominima.jpg"><img class="aligncenter size-medium wp-image-7441" title="008-Typominima" src="http://aext.net/wp-content/uploads/2010/09/008-Typominima-500x388.jpg" alt="" width="500" height="388" /></a></div>
<p><a href="http://typominima.blogsessive.com/">Demo</a> &#8211; <a href="http://blogsessive.com/blogging-tools/typominima-typography-minimal-wordpress-theme/">Download</a></p>
<h3>Modernist</h3>
<div class="bigimage"><a href="http://aext.net/wp-content/uploads/2010/09/Modernist-Minimalist-Wordpress-Theme.jpg"><img class="aligncenter size-medium wp-image-7181" title="Modernist-Minimalist-Wordpress-Theme" src="http://aext.net/wp-content/uploads/2010/09/Modernist-Minimalist-Wordpress-Theme-500x259.jpg" alt="Modernist-Minimalist-Wordpress-Theme" width="500" height="259" /></a></div>
<p><a href="http://rodrigogalindez.com/themes/modern-clix/">Demo</a> &#8211; <a href="http://rodrigogalindez.com/themes/modern-clix/?download=modern-clix">Download</a></p>
<h3>Clear</h3>
<div class="bigimage"><a href="http://aext.net/wp-content/uploads/2010/09/Clear-Wordpress-Theme.jpg"><img class="aligncenter size-medium wp-image-7173" title="Clear-Wordpress-Theme" src="http://aext.net/wp-content/uploads/2010/09/Clear-Wordpress-Theme-500x285.jpg" alt="Clear-Wordpress-Theme" width="500" height="285" /></a></div>
<p><a href="http://clear.kera.la/2009/12/a-wonderful-theme-for-writers/">Demo</a> &#8211; <a href="http://clear.kera.la/2009/12/a-wonderful-theme-for-writers/">Download</a></p>
<h3>StructureTheme</h3>
<div class="bigimage"><a href="http://aext.net/wp-content/uploads/2010/09/002-StructureTheme.jpg"><img class="aligncenter size-medium wp-image-7429" title="002-StructureTheme" src="http://aext.net/wp-content/uploads/2010/09/002-StructureTheme-500x386.jpg" alt="" width="500" height="386" /></a></div>
<p><a href="http://structuretheme.com/demo/">Demo</a> &#8211; <a href="http://www.organicthemes.com/themes/structure-theme/">Download</a></p>
<h3>Neutra</h3>
<div class="bigimage"><a href="http://aext.net/wp-content/uploads/2010/09/Nautra-Wordpress-Theme.jpg"><img class="aligncenter size-medium wp-image-7176" title="Neutra-Wordpress-Theme" src="http://aext.net/wp-content/uploads/2010/09/Nautra-Wordpress-Theme-500x271.jpg" alt="Neutra-Wordpress-Theme" width="500" height="271" /></a></div>
<p><a href="http://www.artmov.com/dev/live/neutra/">Demo</a> &#8211; <a href="http://wordpress.org/extend/themes/neutra">Download</a></p>
<h3>WP-Notes</h3>
<div class="bigimage"><a href="http://aext.net/wp-content/uploads/2010/09/Wp-Notes-Minimalist-Wordpress-Theme.jpg"><img class="aligncenter size-medium wp-image-7196" title="Wp-Notes-Minimalist-Wordpress-Theme" src="http://aext.net/wp-content/uploads/2010/09/Wp-Notes-Minimalist-Wordpress-Theme-500x269.jpg" alt="Wp-Notes-Minimalist-Wordpress-Theme" width="500" height="269" /></a></div>
<p><a href="http://www.beytar.com/notes/?page_id=1845">Demo</a> &#8211; <a href="http://code.google.com/p/wp-notes/">Download</a></p>
<h3>Miniml Press</h3>
<div class="bigimage"><a href="http://aext.net/wp-content/uploads/2010/09/003-Miniml-press.jpg"><img class="aligncenter size-medium wp-image-7431" title="003-Miniml-press" src="http://aext.net/wp-content/uploads/2010/09/003-Miniml-press-500x381.jpg" alt="" width="500" height="381" /></a></div>
<p><a href="http://s51370.gridserver.com/_minimalwordpress/">Demo</a> &#8211; <a href="http://www.siiimple.com/mpw-theme">Download</a></p>
<h3>Oulipo</h3>
<div class="bigimage"><a href="http://aext.net/wp-content/uploads/2010/09/Oulipo-Minimalist-Wordpress-Theme.jpg"><img class="aligncenter size-medium wp-image-7204" title="Oulipo-Minimalist-Wordpress-Theme" src="http://aext.net/wp-content/uploads/2010/09/Oulipo-Minimalist-Wordpress-Theme-500x275.jpg" alt="Oulipo-Minimalist-Wordpress-Theme" width="500" height="275" /></a></div>
<p><a href="http://labs.andreamignolo.com/oulipo/">Demo</a> &#8211; <a href="http://andreamignolo.com/oulipo/">Download</a></p>
<h3>Nameless</h3>
<div class="bigimage"><a href="http://aext.net/wp-content/uploads/2010/09/001-Nameless.jpg"><img class="aligncenter size-medium wp-image-7427" title="001-Nameless" src="http://aext.net/wp-content/uploads/2010/09/001-Nameless-500x388.jpg" alt="" width="500" height="388" /></a></div>
<p><a href="http://themes.koch-werkstatt.de/index.php?wptheme=nameless">Demo</a> &#8211; <a href="http://koch-werkstatt.de/2010/03/21/wordpress-theme-nameless/">Download</a></p>
<h3>Fifty Fifth Street</h3>
<div class="bigimage"><a href="http://aext.net/wp-content/uploads/2010/09/Fifty-Fifth-Street.jpg"><img class="aligncenter size-medium wp-image-7207" title="Fifty-Fifth-Street" src="http://aext.net/wp-content/uploads/2010/09/Fifty-Fifth-Street-500x263.jpg" alt="Fifty-Fifth-Street" width="500" height="263" /></a></div>
<p><a href="http://www.tammyhartdesigns.com/wordpress/index.php?wptheme=Fifty+Fifth+Street">Demo</a> &#8211; <a href="http://tammyhartdesigns.com/free-WordPress-themes/fifty-fifth-street/">Download</a></p>
<h3>Extreme Georgia</h3>
<div class="bigimage"><a href="http://aext.net/wp-content/uploads/2010/09/Extreme-Georgia-Typographic-Wordpress-Theme.jpg"><img class="aligncenter size-medium wp-image-7209" title="Extreme Georgia Typographic WordPress Theme" src="http://aext.net/wp-content/uploads/2010/09/Extreme-Georgia-Typographic-Wordpress-Theme-500x250.jpg" alt="Extreme Georgia Typographic WordPress Theme" width="500" height="250" /></a></div>
<p>Demo not available &#8211; <a href="http://www.wp-them.es/extreme-georgia-wordpress-theme/">Download</a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://aext.net/2010/10/wordpress-typography-themes/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>WordPress 3 and What You Can Do!</title>
		<link>http://aext.net/2010/07/wordpress-3-and-what-you-can-do/</link>
		<comments>http://aext.net/2010/07/wordpress-3-and-what-you-can-do/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 16:30:31 +0000</pubDate>
		<dc:creator>Bima Arafah</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[WordPress Hack]]></category>
		<category><![CDATA[Wordpress Theme]]></category>
		<category><![CDATA[WordPress Tips]]></category>

		<guid isPermaLink="false">http://aext.net/?p=6274</guid>
		<description><![CDATA[<p><a href="http://aext.net/theme/platinoom" title="Platinoom - Premium WordPress Themes"><img src="http://aext.net/wp-content/uploads/2011/04/platinoom_wordpress_theme.png" alt="ThemeKiss" /></a></p><p style="float: right;"><a href="http://api.tweetmeme.com/share?url=http://aext.net/2010/07/wordpress-3-and-what-you-can-do/&service=su.pr&service_api=b57727e991c454bd2b2c62ff71462c79"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://aext.net/2010/07/wordpress-3-and-what-you-can-do/" height="61" width="51" /></a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://aext.net/theme/platinoom" title="Platinoom - Premium WordPress Themes"><img src="http://aext.net/wp-content/uploads/2011/04/platinoom_wordpress_theme.png" alt="ThemeKiss" /></a></p><p style="float: right;"><a href="http://api.tweetmeme.com/share?url=http://aext.net/2010/07/wordpress-3-and-what-you-can-do/&service=su.pr&service_api=b57727e991c454bd2b2c62ff71462c79"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://aext.net/2010/07/wordpress-3-and-what-you-can-do/" height="61" width="51" /></a></p><p>After a quite long awaited by many WordPress users all over the world, finally this world most popular blog portal launchs its brand-new version WordPress 3.0 a.k.a Thelonius.</p>
<p>Thelonius is the software version 13th which have been launched by WordPress until now. We’ll find not less than 2.700 changes and 1.217 bugs fixed inside it. The most striking change is its capability to run some blogs at the same time or generally called <strong>Multiside Capabilities (with WordPress MU)</strong>. Before, each blogs on the web shall be run separately. This capability to run many blogs has been integrated into its brand-new version, so that it can be utilized easier. Bloggers are now be able to upgrade through upgrade menu on the WordPress or we can also download it manually. So what any other features can we maximize on it? Let’s now discuss it a lil’ bit deeper.</p>
<p><span id="more-6274"></span></p>
<div class="txtad-cont">
<div class="txtad-ad">WPfromPSD.com is a leading <a title="PSD to WordPress" href="http://wpfrompsd.com">PSD to WordPress</a> coding shop.</div>
</div>
<h3>New, username and password while installation</h3>
<hr />
<div class="bigimage"><img class="aligncenter size-full wp-image-6277" title="WP3.0 New Username and Password" src="http://aext.net/wp-contents/uploads/2010/07/username.jpg" alt="WP3.0 New Username and Password" width="500" height="343" /></div>
<p>Some people urgently recommend to deactivate or even to avoid using default username and password which are username : admin and default password on every installations. Cause, there were many ways you could be “hijacked” possibly use to break its default username and password on this most crucial case if you’re using WordPress before this 3rd version. But you need it no more now, you’re free to define your username and password at the beginning of WordPress installation. So you don’t need to hack on your WordPress anymore to eliminate its admin default username and password.</p>
<h3>Twenty Ten default theme</h3>
<hr />
<div class="bigimage"><img class="aligncenter size-full wp-image-6278" title="WP3.0 Twenty Ten Default Theme " src="http://aext.net/wp-contents/uploads/2010/07/twenty-ten.jpg" alt="WP3.0 Twenty Ten Default Theme " width="500" height="343" /></div>
<p>After all this time WordPress installation has been bundled with its default theme called Kubrick, now it’s no more with. WordPress now comes with its new bundled theme which’s named Twenty Ten! It’s very good with sweet 2-column display including widgetized sidebar and footer. And believe it or not, now WordPress is equipped with explanation documentation that facilitate anyone to know more deeper about WordPress details. You can check it through the source code from this twenty ten theme. It helps, doesn’t it?</p>
<p>You must know that this twenty ten theme is supported with some new features from WordPress 3, which are:</p>
<h4>Background customization</h4>
<p>Now with WordPress 3 you can change your background with no more trouble. As twenty ten shows us, on the picture below.</p>
<div class="bigimage"><img class="aligncenter size-full wp-image-6294" title="Wordpress Background Customization" src="http://aext.net/wp-contents/uploads/2010/07/c-bg.jpg" alt="Wordpress Background Customization" width="500" height="343" /></div>
<p>Then how to apply it to a theme? Easy, just write down this codes into functions.php file in your theme folder.</p>
<pre>    // allows users to set a custom background
    add_custom_background();</pre>
<p>if you’re done with the codes, you’ll see background menu on the Appearance section</p>
<h4>New editor style</h4>
<p>Many people may find some difficulties to see the style that’s being used by wordpress (previous version) when they’re writing. If you use to write on blog using windows live writer perhaps you can also load the current style that’s being used on your theme onto your visual editor. But you need it no more now, wordpress 3 gives easiness for us to be able to see our preview style while we’re writing on our tiny mce editor, pretty cool huh? Same as before, we need to write down the scripts below to functions.php file in our theme folder.</p>
<pre>  // Apply visual editor with and match the theme style.
  add_editor_style();</pre>
<p>After that don’t forget to create <strong>editor-style.css</strong> file in your theme folder and copy style.css file content then paste it onto editor-style.css file you just created. I suggest you to copy on the sections where your posts will be displayed, which are all classes .entry on style.css file.</p>
<h3>Custom menu management</h3>
<hr />
<p>Many wordpress themes developers intentionally build theme option to their customers, what is the purpose? Just in order to ease them to manage menu navigation layout on their themes. Then, what wordpress 3.0 try to offer to us on this feature, in my opinion it’s proportional with any other CMS out there which also offer this kind of feature on their back-end pages.</p>
<div class="bigimage"><img class="aligncenter size-full wp-image-6295" title="Wordpress Menu" src="http://aext.net/wp-contents/uploads/2010/07/menu.jpg" alt="Wordpress Menu" width="500" height="343" /></div>
<p>Then how do you apply it on your own theme? It’s quite easy, you just need to define this menu on your functions.php file.</p>
<pre> add_theme_support( 'nav-menus' );</pre>
<p>then attach this onto your header section</p>
<pre>wp_nav_menu( array( 'sort_column' =&gt; 'menu_order', 'container_class' =&gt; 'menu-header' ) );</pre>
<h4>Example custom menu</h4>
<p>It’s simple, isn’t it? Then how if I forget to define it on the header section? Simple, now I’ll give some instances for us to explore a bit on this menu feature and let’s just get going. First we have to define our menu later on functions.php file on themes folder.</p>
<pre>/*
 * CUSTOM FUNCTION STARTING FROM HERE
 */

add_action( 'init', 'register_my_menus' );
function register_my_menus() {
    register_nav_menus(
        array(
            'top-menu' =&gt; __( 'Top Menu' ),
            'middle-menu' =&gt; __( 'Middle Menu' ),
            'bottom-menu' =&gt; __( 'Bottom Menu' )
        )
    );
}</pre>
<p>As we see above, that I defined it for 3 kind of custom menus that I’d like to display it later.</p>
<div class="bigimage"><img class="aligncenter size-full wp-image-6296" title="menu-1" src="http://aext.net/wp-contents/uploads/2010/07/menu-1.jpg" alt="Wordpress menu" width="500" height="343" /></div>
<p>Okay then, let’s create menu, give your menu a name TOP, MIDDLE, BOTTOM through “Menu Name” and choose category and page that you’re willing to include to each of your custom menus. I made an example and defined it below</p>
<div class="bigimage"><img class="aligncenter size-full wp-image-6297" title="menu-2" src="http://aext.net/wp-contents/uploads/2010/07/menu-2.jpg" alt="" width="500" height="343" /></div>
<p>After above we defined it for Top Menu, then find this script line on your header.php file</p>
<pre> wp_nav_menu( array( 'container_class' =&gt; 'menu-header', 'theme_location' =&gt; 'primary' ) );</pre>
<p>then change those lines with your custom Top Menu</p>
<pre>// you can use this type too to call wp_menu_nav
// wp_nav_menu( 'sort_column=menu_order&amp;container_class=menu-header&amp;theme_location=top-menu' );

if ( has_nav_menu( 'top-menu' ) ) {
    wp_nav_menu( array( 'container_class' =&gt; 'menu-header', 'theme_location' =&gt; 'top-menu', 'fallback_cb' =&gt; '' ) );
}</pre>
<p>In here is the process to match if there is a matching clauses found with top-menu, then it’ll return true value. You can see, I used has_nav_menu and wp_nav_menu functions. And here it’s the preview from what we’ve just done</p>
<div class="bigimage"><img class="aligncenter size-full wp-image-6298" title="Wordpress menu" src="http://aext.net/wp-contents/uploads/2010/07/menu-3.jpg" alt="Wordpress menu" width="500" height="343" /></div>
<p>How’s that, get enough? Yup I guess it’s enough, but how’s the way to show the description on each menus? Very good question. What’s the use of menu description as seen on menu management picture if we couldn’t display it. In here we need to do some hackings, write down the scripts below onto your functions.php file to display the menu description</p>
<pre>// Hook nav rules to showing description page
// Look details information by this page wp-includes/nav-menu-template.php
// or by this link - http://core.svn.wordpress.org/trunk/wp-includes/nav-menu-template.php
add_filter('walker_nav_menu_start_el', 'description_in_nav_el', 10, 4);
function description_in_nav_el($item_output, $item, $depth, $args){
    $attributes  = ! empty( $item-&gt;attr_title ) ? ' title="'  . esc_attr( $item-&gt;attr_title ) .'"' : '';
    $attributes .= ! empty( $item-&gt;target )     ? ' target="' . esc_attr( $item-&gt;target     ) .'"' : '';
    $attributes .= ! empty( $item-&gt;xfn )        ? ' rel="'    . esc_attr( $item-&gt;xfn        ) .'"' : '';
    $attributes .= ! empty( $item-&gt;url )        ? ' href="'   . esc_attr( $item-&gt;url        ) .'"' : '';

    return preg_replace('/(&lt;a.*?&gt;[^&lt;]*?)&lt;/', "&lt;a $attributes&gt;" . "&lt;span class='test'&gt;{$item-&gt;title}&lt;/span&gt;&lt;br&gt;&lt;span class='test'&gt;{$item-&gt;post_content}&lt;/span&gt;&lt;", $item_output);
}</pre>
<p>Now we can see the condition from our custom menu.</p>
<div class="bigimage"><img class="aligncenter size-full wp-image-6299" title="wordpress menu" src="http://aext.net/wp-contents/uploads/2010/07/menu-4.jpg" alt="wordpress menu" width="500" height="343" /></div>
<p>And these are the source codes after we hacked walker nav menu above</p>
<pre>&lt;li id="menu-item-43" class="menu-item menu-item-type-post_type"&gt;&lt;br&gt;
&lt;a href="http://localhost/wp30/portfolio/"&gt;&lt;span class="test-menu-title"&gt;Portfolio&lt;/span&gt;&lt;br&gt;&lt;span class"test-menu-desc"&gt;See my work!&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;</pre>
<p>You can see it, if there’s a description then it’ll be displayed, but if there’s no menu description found then it’ll only return empty value (space). In here we see that we break title from menu and description from the menu itself, so that we’re free to customize the class from test-menu-title and test-menu-desc with bold, color, italic and anything you want! I think that’s enough for now. Have fun with your menu folks!</p>
<h4>Further information about New Menu System:</h4>
<ul>
<li><a href="http://justintadlock.com/archives/2010/06/01/goodbye-headaches-hello-menus">Excellent article on nav menus by Justin Tadlock</a></li>
<li><a href="http://bavotasan.com/tutorials/wordpress-3-checking-out-the-new-menu-system/">WordPress 3.0: Checking out the New Menu System</a></li>
<li><a href="http://codex.wordpress.org/Function_Reference/wp_nav_menu">Function Reference: wp nav menu – WordPress Codex</a></li>
</ul>
<h3>Custom Post Types for Content Management</h3>
<hr />
<p>This feature is the most awaited feature by wordpress users and developers, the reason is through this feature we’re be able to use wordpress not only as a blog machine but also as full Content Management System. What I like from this feature is the content classification is run separately, for example when we build a portfolio. How, let’s just study it step by step.</p>
<p>Custom post types, in its usage for a portfolio it’s very ease us for content sorting which has particular posting category/type. There are so many things that we can create and develop through this custom post types, and I’ll give some instances to you how to create portfolio page using this custom post type and combining with your custom field. First of all, we need to write down the scripts below onto our functions.php file.</p>
<pre>/*
 * custom post for super porto
 */

add_action( 'init', 'create_my_post_types' );

function create_my_post_types() {
    register_post_type( 'pf_cpt',
        array(
                'labels' =&gt; array(
                'name' =&gt; __( 'Portfolios' ),
                'singular_name' =&gt; __( 'Portfolio' ),
                'add_new' =&gt; __( 'Add New Item' ),
                'add_new_item' =&gt; __( 'Add New Portfolio' ),
                'edit' =&gt; __( 'Edit Item' ),
                'edit_item' =&gt; __( 'Edit Portfolio' ),
                'new_item' =&gt; __( 'New Portfolio' ),
                'view' =&gt; __( 'View Portfolio' ),
                'view_item' =&gt; __( 'View Portfolio' ),
                'search_items' =&gt; __( 'Search Portfolio Items' ),
                'not_found' =&gt; __( 'No Portfolio Items found' ),
                'not_found_in_trash' =&gt; __( 'No Portfolio Items found in Trash' ),
                'parent' =&gt; __( 'Parent Portfolio' ),
            ),
            'public' =&gt; true,
            'show_ui' =&gt; true,
            'menu_icon' =&gt; get_stylesheet_directory_uri() . '/images/picture.png', // icon defined
            'menu_position' =&gt; 20, // 5 - below Posts | 10 - below Media | 20 - below Pages
            'hierarchical' =&gt; true,
            'supports' =&gt; array( 'title', 'editor', 'custom-fields', 'thumbnail' )
        )
    );

    register_taxonomy( 'charge-type', 'pf_cpt', // in-case you do for commercial or free (such as foundation etc)
        array(
             'hierarchical' =&gt; false, // or true
             'label' =&gt; __('Free or Commercial'),
             'query_var' =&gt; 'charge',
             'rewrite' =&gt; array('slug' =&gt; 'charge' ) ) );

    register_taxonomy( 'client', 'pf_cpt', // in-case you have 2 or 3 boss (clients) at one project
        array(
             'hierarchical' =&gt; false, // or true
             'label' =&gt; __('Clients'),
             'query_var' =&gt; 'client',
             'rewrite' =&gt; array('slug' =&gt; 'client' ) ) );

    register_taxonomy( 'project-type', 'pf_cpt',
        array(
             'hierarchical' =&gt; false, // or true
             'label' =&gt; __('Project Type'),
             'query_var' =&gt; 'project',
             'rewrite' =&gt; array('slug' =&gt; 'project' ) ) );

    register_taxonomy( 'tasks', 'pf_cpt', // for specified your tasks
        array(
             'hierarchical' =&gt; false, // or true
             'label' =&gt; __('Your Task'),
             'query_var' =&gt; 'task',
             'rewrite' =&gt; array('slug' =&gt; 'task' ) ) );
}</pre>
<p>Another reference about register post types, <a href="http://codex.wordpress.org/Function_Reference/register_post_type">Function Reference/register post type</a>. And then after we wrote down the codes above onto functions.php file, let’s now see the back-end display for custom post types that we’ve just created.</p>
<div class="bigimage"><img class="aligncenter size-full wp-image-6302" title="Wordpress custom post" src="http://aext.net/wp-contents/uploads/2010/07/cpt-1.jpg" alt="Wordpress custom post" width="500" height="350" /></div>
<p>And our this editor page we’ll be looked like this after we clicked Add New Item</p>
<div class="bigimage"><a href="http://aext.net/wp-contents/uploads/2010/07/cpt-2.jpg"><img class="aligncenter size-medium wp-image-6303" title="wordpress custom post" src="http://aext.net/wp-contents/uploads/2010/07/cpt-2-500x383.jpg" alt="wordpress custom post" width="500" height="383" /></a>Click to see full size image</p>
</div>
<p>You can see what we’ve done through the preview above. On the bottom-left side Menu Pages (because we gave value 20 before) there’s our new menu including its taxonomies custom for controlling based on its related custom post type. On the middle section, we have title, editor, and custom field for editing needs. On the right side coloumn, there are custom taxonomies input for Project Type (Logo, Website, etc), Charge (Commercial, Non-Commercial, etc), Clients (Company A, B, C, etc) Your Task (WordPress integration, xHTML and CSS design, PSD Design, etc)</p>
<p>Now how about that? Anyone has a question?</p>
<p><em><strong>“Yes, I have a question. How to create Custom URL for each items please?”</strong></em></p>
<p>Okay, we have two tricks in here. The first one is with adding metabox on our editor custom post types pages.</p>
<pre> add_meta_box( $id, $title, $callback, $page, $context, $priority );</pre>
<p>Write down these codes onto functions.php file to create meta box that will be our custom url</p>
<pre>&lt;?php
    add_action("admin_init", "pf_cpt_url");
    add_action('save_post', 'update_pf_cpt_url');
    function pf_cpt_url(){
        // http://codex.wordpress.org/Function_Reference/add_meta_box
        // add_meta_box( $id, $title, $callback, $page, $context, $priority );
        add_meta_box("portfolio_details", "Custom URL", "pf_cpt_url_options", "pf_cpt", "side", "low");
    }
    function pf_cpt_url_options(){
        global $post;
        $custom = get_post_custom($post-&gt;ID);
        $custom_url = $custom["custom_url"][0];
?&gt;
    &lt;div id="portfolio-options"&gt;
        &lt;label&gt;URL:&lt;/label&gt;&lt;input name="custom_url" value="&lt;?php echo $custom_url; ?&gt;" /&gt;       
    &lt;/div&gt;&lt;!--end portfolio-options--&gt;   
&lt;?php
    }
    function update_pf_cpt_url(){
        global $post;
        update_post_meta($post-&gt;ID, "custom_url", $_POST["custom_url"]);
    }
?&gt;</pre>
<p>And it’ll be seen like this later on your editor page</p>
<div class="bigimage"><img class="aligncenter size-full wp-image-6304" title="wordpress custom post" src="http://aext.net/wp-contents/uploads/2010/07/cpt-3.jpg" alt="wordpress custom post" width="500" height="350" /></div>
<p>And the second one is with using custom field, I myself is prefer to use custom field. But once again, it’s all up to you. So now let’s we fill our custom post types first with some datas which will be displayed later on the portfolio page.</p>
<p>By default, you can display your custom post types on the portfolio page this way, write down the codes below on the template file for your portfolio page</p>
<pre>&lt;?php
/*
Template Name: Portfolio
*/
?&gt;
&lt;?php get_header(); ?&gt;
&lt;?php
&lt;div id="content"&gt;
&lt;?php $p_loop = new WP_Query( array( 'post_type' =&gt; 'pf_cpt', 'posts_per_page' =&gt; 10 ) ); ?&gt;
&lt;?php while ( $p_loop-&gt;have_posts() ) : $p_loop-&gt;the_post(); ?&gt;
&lt;?php the_title( '&lt;h2 class="entry-title"&gt;&lt;a href="' . get_permalink() . '" title="' . the_title_attribute( 'echo=0' ) . '" rel="bookmark"&gt;', '&lt;/a&gt;&lt;/h2&gt;' ); ?&gt;

&lt;?php 

  $custom = get_post_custom($post-&gt;ID);
  $website_url = $custom["custom_url"][0];
  if($custom != "" ) {

  ?&gt;

&lt;a href="&lt;?php echo $website_url; ?&gt;"&gt;&lt;?php the_post_thumbnail(); ?&gt; &lt;/a&gt;

&lt;?php

  } else { the_post_thumbnail(); }

  ?&gt;

&lt;div class="entry-content"&gt;&lt;?php the_content(); ?&gt;&lt;/div&gt; 

&lt;?php endwhile; ?&gt;
&lt;/div&gt;&lt;!-- #content --&gt;

?&gt;
&lt;?php get_footer(); ?&gt;</pre>
<p>How’s the display, do you see the thumbnail that you’ve defined it before including its custom taxonomies you’ve determined on each items? Then how about to display and format the display? It’s easy. Later we’ll get it formatted based on each Project Type that you’ve defined through custom taxonomies and it’ll be indexed based on custom field with key = year and value = yyyy-mm-dd, and you have to know that in here I defined Project Type with value Website, Logo, Poster, etc where one item of portfolio is representated by one project type</p>
<div class="bigimage"><img class="aligncenter size-full wp-image-6305" title="wordpress custom post" src="http://aext.net/wp-contents/uploads/2010/07/cpt-4.jpg" alt="wordpress custom post" width="500" height="230" /></div>
<p>Then paste these scripts into template file for the page above so it’s gonna be:</p>
<pre>&lt;?php
/*
Template Name: Portfolio
*/
?&gt;

&lt;?php get_header(); ?&gt;

&lt;div id="content"&gt;
&lt;h1&gt;Website&lt;/h1&gt;

&lt;?php

$querystr = "SELECT *
  FROM $wpdb-&gt;posts
  LEFT JOIN $wpdb-&gt;term_relationships ON($wpdb-&gt;posts.ID = $wpdb-&gt;term_relationships.object_id)
  LEFT JOIN $wpdb-&gt;term_taxonomy ON($wpdb-&gt;term_relationships.term_taxonomy_id = $wpdb-&gt;term_taxonomy.term_taxonomy_id)
  LEFT JOIN $wpdb-&gt;terms ON($wpdb-&gt;term_taxonomy.term_id = $wpdb-&gt;terms.term_id)
  LEFT JOIN $wpdb-&gt;postmeta ON($wpdb-&gt;posts.ID = $wpdb-&gt;postmeta.post_id)
  WHERE $wpdb-&gt;posts.post_type = 'pf_cpt'
  AND $wpdb-&gt;posts.post_status = 'publish'
  AND $wpdb-&gt;term_taxonomy.taxonomy = 'project-type'
  AND $wpdb-&gt;terms.slug = 'website'
  AND $wpdb-&gt;postmeta.meta_key = 'year'
  ORDER BY $wpdb-&gt;postmeta.meta_value DESC";
  // see value 'project-type' and value 'website'
  // feel free to define any value from your taxonomies, for grouping

  $result = $wpdb-&gt;get_results("$querystr");
  foreach($result as $post){

  setup_postdata($post); // remember this line, it needs cause our "foreach" statement

  ?&gt;

&lt;?php the_title( '&lt;h2 class="entry-title"&gt;', '&lt;/h2&gt;' ); ?&gt;

&lt;?php 

  $custom = get_post_custom($post-&gt;ID);
  $website_url = $custom["custom_url"][0];
  if($custom != "" ) {

  ?&gt;

&lt;br&gt;&lt;a href="&lt;?php echo $website_url; ?&gt;"&gt;&lt;?php the_post_thumbnail(); ?&gt; &lt;/a&gt;

&lt;?php

  } else { the_post_thumbnail(); }

  ?&gt;

 &lt;div class="entry-content"&gt;
&lt;?php the_content(); ?&gt;

&lt;?php

  // define something
  $taxo = "";

  // Variables to store each of our possible taxonomy lists
  // This one checks for an Year classification

  $project_type_list = get_the_term_list( $post-&gt;ID, 'project-type', '&lt;strong&gt;Project Type(s):&lt;/strong&gt; ', ', ', '' );
  $commercial_type_list = get_the_term_list( $post-&gt;ID, 'charge-type', '&lt;strong&gt;Type(s):&lt;/strong&gt; ', ', ', '' );
  $client_list = get_the_term_list( $post-&gt;ID, 'client', '&lt;strong&gt;Client(s):&lt;/strong&gt; ', ', ', '' );
  $task = get_the_term_list( $post-&gt;ID, 'tasks', '&lt;strong&gt;Task(s):&lt;/strong&gt; ', ', ', '' );

  // if it's not empty, return value of each type
  // define project type value
  if ( '' != $project_type_list ) { $taxo .= "$project_type_list&lt;br /&gt;\n"; }

  // define commercials or non commercials project type
  if ( '' != $commercial_type_list ) { $taxo .= "$commercial_type_list&lt;br /&gt;\n"; }

  // define client list value
  if ( '' != $client_list ) { $taxo .= "$client_list&lt;br /&gt;\n"; }

  // define task value
  if ( '' != $task ) { $taxo .= "$task&lt;br /&gt;\n"; }

  // Output taxonomy information if there was any
  if ( $taxo != '' ) {

  ?&gt;

&lt;div class="entry-utility"&gt;

&lt;?php 

  if ( get_post_meta($post-&gt;ID, 'year', true) ) :
    $date = get_post_meta($post-&gt;ID, 'year', true);
    $dateTime = new DateTime($date);
    $formatted_date=date_format ( $dateTime, 'F Y' );
        echo 'Date: '.$formatted_date.'&lt;br&gt;';
  endif; ?&gt;

&lt;?php

  echo $taxo;

  ?&gt;

&lt;/div&gt;&lt;br&gt;

&lt;?php

  } // endif

  ?&gt;

&lt;/div&gt;

&lt;?php

  }

?&gt;

&lt;/div&gt;

&lt;?php get_footer(); ?&gt;</pre>
<p>And you’ll get a display which looks like below</p>
<div class="bigimage"><img class="aligncenter size-full wp-image-6306" title="wordpress custom post" src="http://aext.net/wp-contents/uploads/2010/07/cpt-5.jpg" alt="wordpress custom post" width="500" height="800" /></div>
<p>But after you noticed it, how’s it so the value from each custom taxonomies isn’t be formed as a link (url)..? just change the codes above become codes below</p>
<pre>$project_type_list = strip_tags( get_the_term_list( $post-&gt;ID, 'project-type', 'Project Type(s): ', ', ', '' ) );
$commercial_type_list = strip_tags( get_the_term_list( $post-&gt;ID, 'charge-type', 'Type(s): ', ', ', '' ) );
$client_list = strip_tags( get_the_term_list( $post-&gt;ID, 'client', 'Client(s): ', ', ', '' ) );
$task = strip_tags( get_the_term_list( $post-&gt;ID, 'tasks', 'Task(s): ', ', ', '' ) );</pre>
<p>See that strip_tags( [your_term_list] ); to ignore HTML format. Simple, right? Then it’s done, have fun with your custom post types and custom taxonomies folks!</p>
<h4>Further information about this features:</h4>
<ul>
<li><a href="http://wpengineer.com/impressions-of-custom-post-type/">First Impressions of Custom Post Type</a></li>
<li><a href="http://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress">Custom post types in WordPress</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://net.tutsplus.com/tutorials/wordpress/introducing-wordpress-3-custom-taxonomies/">Introducing WordPress 3 Custom Taxonomies</a></li>
<li><a href="http://net.tutsplus.com/tutorials/wordpress/rock-solid-wordpress-3-0-themes-using-custom-post-types/">Rock-Solid WordPress 3.0 Themes using Custom Post Types</a></li>
<li><a href="http://www.vooshthemes.com/blog/wordpress-tip/create-a-professional-portfolio-using-wordpress-3-0-custom-post-types/">Create A Professional Portfolio Using WordPress 3.0 Custom Post Types </a></li>
</ul>
<h3>Conclusion</h3>
<hr />
<p>I think it’s pretty tempting your insight about WordPress 3.0, and what you can do with it furthermore, as a blog machine or as a CMS, that’s up to you. So now what about we’re having share about it, what do you think about WordPress 3.0 and for you that’ve already experienced with it, you may share with us here, I think that’s why sharing considered as caring.. arghh it’s pain to say it.. :p See ya!</p>
<h4>Another References</h4>
<ul>
<li><a href="http://net.tutsplus.com/tutorials/wordpress/10-features-to-look-forward-to-in-wordpress-3-0/">10 Features to Look Forward to in WordPress 3.0</a><br />
WordPress 3.0 is scheduled to be released within the next 30-60 days. There are some great new features coming, including custom post types, a new default theme, and a menu manager. Read on Nettuts to find out what to expect in version three!</li>
<li><a href="http://sixrevisions.com/wordpress/wordpress-3-0-guide/">WordPress 3.0: Ultimate Guide to New Features</a><br />
WordPress 3.0 — the newest major version of WordPress — is one of the most highly-anticipated open source upgrades this year. Good article from Saad Bassi on Six Revisions</li>
<li><a href="http://designm.ag/design/wordpress-3-0/">9 Features We Most Want in WordPress 3.0</a><br />
Messageboards are currently awash with demanding bloggers, listing the new features they most want to see and the plugins they want shifted into core. By this article on DesignM.ag you’ll find the 9 new features that are most in demand.</li>
<li><a href="http://www.wpbeginner.com/news/whats-coming-in-wordpress-3-0-features/">What’s Coming in WordPress 3.0 (Features)</a><br />
Another reference from WpBeginner, just check this out too guys!</li>
<li><a href="http://mashable.com/2010/05/10/new-features-wordpress-3/">WordPress 3.0: The 5 Most Important New Features</a><br />
The list of new features in WordPress 3.0 isn’t very long in comparison to previous releases. However, the changes that are coming will certainly have a significant impact, particularly if you use WordPress as a CMS. Here is a rundown of the most important new features arriving in version 3.0. Mashable will let you know which features of WordPress 3.0 you are most looking forward to.</li>
<li><a href="http://web.appstorm.net/roundups/self-publishing/10-great-new-features-in-wordpress-3-0/">10 Great New Features in WordPress 3.0</a><br />
WordPress is by far the most popular blogging platform available and with over half a million known websites running on the software, it’s no surprise there’s a big news surge when a new version is released. Read more on Web.AppStorm</li>
</ul>
<div class="txtad-cont"></div>
]]></content:encoded>
			<wfw:commentRss>http://aext.net/2010/07/wordpress-3-and-what-you-can-do/feed/</wfw:commentRss>
		<slash:comments>38</slash:comments>
		</item>
		<item>
		<title>WordPress Theme from Scratch &#8211; Day 3: HTML to WordPress</title>
		<link>http://aext.net/2010/01/wordpress-theme-from-scratch-day-3-html-to-wordpress/</link>
		<comments>http://aext.net/2010/01/wordpress-theme-from-scratch-day-3-html-to-wordpress/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 09:52:39 +0000</pubDate>
		<dc:creator>Lief</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Popular]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Theme Design]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Wordpress Theme]]></category>

		<guid isPermaLink="false">http://aext.net/?p=2571</guid>
		<description><![CDATA[<p><a href="http://aext.net/theme/platinoom" title="Platinoom - Premium WordPress Themes"><img src="http://aext.net/wp-content/uploads/2011/04/platinoom_wordpress_theme.png" alt="ThemeKiss" /></a></p><p style="float: right;"><a href="http://api.tweetmeme.com/share?url=http://aext.net/2010/01/wordpress-theme-from-scratch-day-3-html-to-wordpress/&service=su.pr&service_api=b57727e991c454bd2b2c62ff71462c79"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://aext.net/2010/01/wordpress-theme-from-scratch-day-3-html-to-wordpress/" height="61" width="51" /></a></p>This tutorial is in the series of â€œWordPress Theme from Scratchâ€ that helps you build a WordPress theme by yourself from nothing. Previous tutorial in this series helped we convert a mockup in PSD to HTML and today, we will continue to go to last tutorial: build WordPress theme from the HTML file. <a href="http://aext.net/2010/01/wordpress-theme-from-scratch-day-3-html-to-wordpress/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://aext.net/theme/platinoom" title="Platinoom - Premium WordPress Themes"><img src="http://aext.net/wp-content/uploads/2011/04/platinoom_wordpress_theme.png" alt="ThemeKiss" /></a></p><p style="float: right;"><a href="http://api.tweetmeme.com/share?url=http://aext.net/2010/01/wordpress-theme-from-scratch-day-3-html-to-wordpress/&service=su.pr&service_api=b57727e991c454bd2b2c62ff71462c79"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://aext.net/2010/01/wordpress-theme-from-scratch-day-3-html-to-wordpress/" height="61" width="51" /></a></p><p>This tutorial is in the series of â€œWordPress Theme from Scratchâ€ that helps you build a WordPress theme by yourself from nothing. Previous tutorial in this series helped we convert a mockup in PSD to HTML and today, we will continue to go to last tutorial: build WordPress theme from the HTML file.</p>
<p><span id="more-2571"></span></p>
<p>The most difference between WordPress and other blog platforms in theme development is WordPress theme more easier than others for development. In basic, the elements of wordpress theme likes blocks and building WordPress theme likes we build these blocks to make them to fit together.</p>
<p>In WordPress template, some file we will use to display it in all page on our website such as: header, footer, sidebar &#8230; and other file we have to customize it to fit our requirements under specific conditions. If you are going to build a WordPress theme, I recommend to take a look at &#8220;<a href="http://codex.wordpress.org/Using_Themes">Using_Themes section in WordPress Codex</a>&#8221; to understand how a theme built.</p>
<div class="demo-download">
<ul>
<li><a href="http://aext.net/Downloads/FrozenFlirt.zip" target="_blank"><span class="downloadit">Download</span></a></li>
<li><a href="http://aext.net/wordpress-theme-tutorial/frozenflirt/" target="_blank"><span class="demoit">Demo</span></a></li>
</ul>
</div>
<h3>Prepare files for theme</h3>
<hr />
<p>In this tutorial, I will help you build your first WordPress theme that <em>works</em>. That means I&#8217;m gonna build some important files that WordPress requires to run without errors. My FrozenFlirt WordPress theme should contains these files:</p>
<pre>--<strong>FrozenFlirt</strong>
-----header.php
-----index.php (Homepage display)
-----single.php (Post display)
-----archive.php (Archive display for categories, tags, date, authors...)
-----comments.php (Comment temple include form, post comments)
-----sidebar.php
-----functions.php (All of your template functions will go here)
-----footer.php
-----style.css
-----<strong>image</strong>
-----<strong>js</strong></pre>
<p><strong>Note:</strong> These files need for your template works with basic requirements such as: post, categories, tags, authors, search &#8230; viewing. If you want more, build as same as we are doing here with 404 display, links template &#8230;</p>
<p>Before start, copy all images in this HTML layout to <strong>images</strong> directory and all css files to the root theme folder. Furthermore, this theme is using one javascript file call <em>script.js</em>, so copy this file to folder <strong>js</strong>.</p>
<p>Let&#8217;s begin!</p>
<h3>Split HTML layout</h3>
<hr />
<p>We will use header, sidebar and footer to display in all pages, so we need to split our HTML file into 3 main parts: header.php, sidebar.php and footer.php.</p>
<div class="bigimage"><img class="aligncenter size-full wp-image-2583" title="WordPress theme splitting template files 2" src="http://aext.net/wp-contents/uploads/2010/01/WordPress-theme-splitting-template-files-2-e1262852552626.png" alt="" width="500" height="609" /></div>
<p>Refer to the HTML file in previous tutorial: <a href="http://aext.net/2009/12/wordpress-theme-from-scratch-%E2%80%93-day-2-psd-to-html/">WordPress Theme from Scratch â€“ Day 2: PSD to HTML</a> and after splitting, we have these files:</p>
<p>header.php</p>
<pre class="html"><em><span style="color: #236e25;">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;</span></em>
<span style="color: #881280;">&lt;html </span><span style="color: #994500;">xmlns</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"http://www.w3.org/1999/xhtml"</span><span style="color: #881280;">&gt;</span>
<span style="color: #881280;">&lt;head&gt;</span>
    <span style="color: #881280;">&lt;meta </span><span style="color: #994500;">http-equiv</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Content-Type"</span><span style="color: #994500;">content</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"text/html; charset=UTF-8"</span><span style="color: #881280;"> /&gt;</span>
    <span style="color: #881280;">&lt;title&gt;</span>FrozenFlirt WordPress Theme From Scratch<span style="color: #881280;">&lt;/title&gt;</span>
    <span style="color: #881280;">&lt;link </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"reset.css"</span><span style="color: #994500;">rel</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"stylesheet"</span><span style="color: #994500;">type</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"text/css"</span><span style="color: #881280;"> /&gt;</span>
    <span style="color: #881280;">&lt;link </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"style.css"</span><span style="color: #994500;">rel</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"stylesheet"</span><span style="color: #994500;">type</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"text/css"</span><span style="color: #881280;"> /&gt;</span>
    <span style="color: #881280;">&lt;link </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"pagenavi-css.css"</span><span style="color: #994500;">rel</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"stylesheet"</span><span style="color: #994500;">type</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"text/css"</span><span style="color: #881280;"> /&gt;</span>
    <span style="color: #881280;">&lt;script </span><span style="color: #994500;">src</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"</span><span style="color: #994500;">type</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"text/javascript"</span><span style="color: #881280;">&gt;&lt;/script&gt;</span>
    <span style="color: #881280;">&lt;script </span><span style="color: #994500;">src</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"script.js"</span><span style="color: #994500;">type</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"text/javascript"</span><span style="color: #881280;">&gt;&lt;/script&gt;</span>
    <span style="color: #881280;">&lt;script </span><span style="color: #994500;">type</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"text/javascript"</span><span style="color: #881280;">&gt;</span>

        $(document).<span style="color: #003369;">ready</span>(<span style="color: #881350;">function</span>() {

            <span style="color: #881350;">var</span> id = <span style="color: #760f15;">'35591378@N03'</span>;
            <span style="color: #003369;">flickr</span>(id);

            });

    <span style="color: #881280;">&lt;/script&gt;</span>

<span style="color: #881280;">&lt;/head&gt;</span>

<span style="color: #881280;">&lt;body&gt;</span>

    <span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"main-wrapper"</span><span style="color: #881280;">&gt;</span>

        <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"container"</span><span style="color: #881280;">&gt;</span>

            <span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"header"</span><span style="color: #881280;">&gt;</span>

                <span style="color: #881280;">&lt;ul </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"topmenu"</span><span style="color: #881280;">&gt;</span>
                    <span style="color: #881280;">&lt;li&gt;</span>
                        <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Home Page"</span><span style="color: #881280;">&gt;&lt;span&gt;</span>Home<span style="color: #881280;">&lt;/span&gt;&lt;/a&gt;</span>
                    <span style="color: #881280;">&lt;/li&gt;</span>
                    <span style="color: #881280;">&lt;li&gt;</span>
                        <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Tutorial Category"</span><span style="color: #881280;">&gt;&lt;span&gt;</span>Tutorial<span style="color: #881280;">&lt;/span&gt;&lt;/a&gt;</span>
                    <span style="color: #881280;">&lt;/li&gt;</span>
                    <span style="color: #881280;">&lt;li&gt;</span>
                        <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Freebie Category"</span><span style="color: #881280;">&gt;&lt;span&gt;</span>Freebie<span style="color: #881280;">&lt;/span&gt;&lt;/a&gt;</span>
                    <span style="color: #881280;">&lt;/li&gt;</span>
                    <span style="color: #881280;">&lt;li&gt;</span>
                        <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Inspiration Category"</span><span style="color: #881280;">&gt;&lt;span&gt;</span>Inspiration<span style="color: #881280;">&lt;/span&gt;&lt;/a&gt;</span>
                    <span style="color: #881280;">&lt;/li&gt;</span>
                    <span style="color: #881280;">&lt;li&gt;</span>
                        <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Resources Category"</span><span style="color: #881280;">&gt;&lt;span&gt;</span>Resources<span style="color: #881280;">&lt;/span&gt;&lt;/a&gt;</span>
                    <span style="color: #881280;">&lt;/li&gt;</span>
                <span style="color: #881280;">&lt;/ul&gt;</span>

                <span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"topsearch"</span><span style="color: #881280;">&gt;</span>
                    <span style="color: #881280;">&lt;form </span><span style="color: #994500;">action</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"http://aext.net/"</span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"searchform"</span><span style="color: #994500;">method</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"get"</span><span style="color: #881280;">&gt;</span>
                        <span style="color: #881280;">&lt;fieldset&gt;</span>
                            <span style="color: #881280;">&lt;input </span><span style="color: #994500;">type</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"text"</span><span style="color: #881280;">                                    </span><span style="color: #994500;">onblur</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"if (this.value == '') {this.value = 'Type Keywords And Hit Enter...';}"</span><span style="color: #881280;">                                    </span><span style="color: #994500;">onfocus</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"if(this.value == 'Type Keywords And Hit Enter...') {this.value = '';}"</span><span style="color: #881280;">                                    </span><span style="color: #994500;">value</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Type Keywords And Hit Enter..."</span><span style="color: #881280;">                                    </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"searchfield"</span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"searchbox"</span><span style="color: #994500;">name</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"s"</span><span style="color: #881280;">/&gt;</span>
                        <span style="color: #881280;">&lt;/fieldset&gt;</span>
                    <span style="color: #881280;">&lt;/form&gt;</span>
                <span style="color: #881280;">&lt;/div&gt;</span>

                <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"clear"</span><span style="color: #881280;">&gt;&lt;/div&gt;</span>

                <span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"logo"</span><span style="color: #881280;">&gt;</span>
                    <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"FrozenFlirt Homepage"</span><span style="color: #881280;">&gt;&lt;h1&gt;</span>FrozenFlirt Theme<span style="color: #881280;">&lt;/h1&gt;&lt;/a&gt;</span>
                    <span style="color: #881280;">&lt;h3&gt;</span>"Wordpress Theme From Scratch"<span style="color: #881280;">&lt;/h3&gt;</span>
                <span style="color: #881280;">&lt;/div&gt;</span>

                <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"clear"</span><span style="color: #881280;">&gt;&lt;/div&gt;</span>

            <span style="color: #881280;">&lt;/div&gt;</span></pre>
<p>sidebar.php</p>
<pre class="html">            <span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"sidebar"</span><span style="color: #881280;">&gt;</span>

                <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"widget"</span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"adblocks"</span><span style="color: #881280;">&gt;</span>

                    <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">""</span><span style="color: #881280;">&gt;&lt;img </span><span style="color: #994500;">src</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"images/ads/vivatheme.png"</span><span style="color: #994500;">alt</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Viva Theme"</span><span style="color: #881280;"> /&gt;&lt;/a&gt;</span>
                    <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">""</span><span style="color: #881280;">&gt;&lt;img </span><span style="color: #994500;">src</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"images/ads/pixelcrayons.jpg"</span><span style="color: #994500;">alt</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Pixel Crayons"</span><span style="color: #881280;"> /&gt;&lt;/a&gt;</span>
                    <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">""</span><span style="color: #881280;">&gt;&lt;img </span><span style="color: #994500;">src</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"images/ads/wpbest.gif"</span><span style="color: #994500;">alt</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"WPBEST"</span><span style="color: #881280;"> /&gt;&lt;/a&gt;</span>
                    <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">""</span><span style="color: #881280;">&gt;&lt;img </span><span style="color: #994500;">src</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"images/ads/buysellstockdesign.gif"</span><span style="color: #994500;">alt</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Buy Sell Stock Design"</span><span style="color: #881280;"> /&gt;&lt;/a&gt;</span>

                <span style="color: #881280;">&lt;/div&gt;</span>

                <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"widget"</span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"popular-posts"</span><span style="color: #881280;">&gt;</span>
                    <span style="color: #881280;">&lt;h3&gt;</span>Popular Posts<span style="color: #881280;">&lt;/h3&gt;</span>
                    <span style="color: #881280;">&lt;ul&gt;</span>

                        <span style="color: #881280;">&lt;li&gt;&lt;a </span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"blablabla"</span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #881280;">&gt;&lt;span </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"wpp-post-title"</span><span style="color: #881280;">&gt;</span>5 New Useful jQuery Plugins For Your Next Projects<span style="color: #881280;">&lt;/span&gt;&lt;/a&gt;</span> <span style="color: #881280;">&lt;/li&gt;</span>
                        <span style="color: #881280;">&lt;li&gt;&lt;a </span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"blablabla"</span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #881280;">&gt;&lt;span </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"wpp-post-title"</span><span style="color: #881280;">&gt;</span>35 Fresh and Cool Web Design Interfaces for Inspiration<span style="color: #881280;">&lt;/span&gt;&lt;/a&gt;</span> <span style="color: #881280;">&lt;/li&gt;</span>
                        <span style="color: #881280;">&lt;li&gt;&lt;a </span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"blablabla"</span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #881280;">&gt;&lt;span </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"wpp-post-title"</span><span style="color: #881280;">&gt;</span>Bubble Effect with CSS<span style="color: #881280;">&lt;/span&gt;&lt;/a&gt;</span> <span style="color: #881280;">&lt;/li&gt;</span>
                        <span style="color: #881280;">&lt;li&gt;&lt;a </span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"blablabla"</span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #881280;">&gt;&lt;span </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"wpp-post-title"</span><span style="color: #881280;">&gt;</span>CSS Absolute Positioning: Create A Fancy Link Block<span style="color: #881280;">&lt;/span&gt;&lt;/a&gt;</span> <span style="color: #881280;">&lt;/li&gt;</span>
                        <span style="color: #881280;">&lt;li&gt;&lt;a </span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"blablabla"</span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #881280;">&gt;&lt;span </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"wpp-post-title"</span><span style="color: #881280;">&gt;</span>Incredible Drop Down Menu Solution With CSS Only<span style="color: #881280;">&lt;/span&gt;&lt;/a&gt;</span> <span style="color: #881280;">&lt;/li&gt;</span>
                    <span style="color: #881280;">&lt;/ul&gt;</span>

                <span style="color: #881280;">&lt;/div&gt;</span>

            <span style="color: #881280;">&lt;/div&gt;</span>

            <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"clear"</span><span style="color: #881280;">&gt;&lt;/div&gt;</span></pre>
<p>footer.php</p>
<pre class="html">            <span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"flickr-stream"</span><span style="color: #881280;">&gt;</span>

                <span style="color: #881280;">&lt;h3&gt;</span>Flickr Stream<span style="color: #881280;">&lt;/h3&gt;</span>
                <span style="color: #881280;">&lt;hr /&gt;</span>
                <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"clear"</span><span style="color: #881280;">&gt;&lt;/div&gt;</span>
                <span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"flickr"</span><span style="color: #881280;">&gt;</span>
                    <span style="color: #881280;">&lt;noscript&gt;</span>Your message for people w/o javascript enabled goes here.<span style="color: #881280;">&lt;/noscript&gt;</span>
                <span style="color: #881280;">&lt;/div&gt;</span>

            <span style="color: #881280;">&lt;/div&gt;</span>      

            <span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"twitter-update"</span><span style="color: #881280;">&gt;</span>
                <span style="color: #881280;">&lt;h3&gt;</span>Twitter Update<span style="color: #881280;">&lt;/h3&gt;</span>
                <span style="color: #881280;">&lt;hr /&gt;</span>
                <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"clear"</span><span style="color: #881280;">&gt;&lt;/div&gt;</span>
                <span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"twitter"</span><span style="color: #881280;">&gt;</span>
                    <span style="color: #881280;">&lt;ul </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">'twitter_update_list'</span><span style="color: #881280;">&gt;&lt;/ul&gt;</span>
                <span style="color: #881280;">&lt;/div&gt;</span>
                <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"http://twitter.com/prlamnguyen"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Follow me on twitter"</span><span style="color: #881280;">&gt;&lt;span </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"followme"</span><span style="color: #881280;">&gt;</span>Follow Me!<span style="color: #881280;">&lt;/span&gt;&lt;/a&gt;</span>

            <span style="color: #881280;">&lt;/div&gt;</span>                      

        <span style="color: #881280;">&lt;/div&gt;</span>

    <span style="color: #881280;">&lt;/div&gt;</span>

    <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"clear"</span><span style="color: #881280;">&gt;&lt;/div&gt;</span>

    <span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"footer-wrapper"</span><span style="color: #881280;">&gt;</span>

        <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"container"</span><span style="color: #881280;">&gt;</span>

            <span style="color: #881280;">&lt;p </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"copyright"</span><span style="color: #881280;">&gt;&amp;copy;</span>2009 FrozenFlirt. All Rights Reserved<span style="color: #881280;">&lt;/p&gt;</span>

            <span style="color: #881280;">&lt;p </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"designedby"</span><span style="color: #881280;">&gt;</span>WordPress Theme Design by <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"http://aext.net"</span><span style="color: #881280;">&gt;&lt;img </span><span style="color: #994500;">src</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"images/aext.png"</span><span style="color: #994500;">alt</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Theme by AEXT.NET"</span><span style="color: #881280;"> /&gt;&lt;/a&gt;&lt;/p&gt;</span>

        <span style="color: #881280;">&lt;/div&gt;</span>

    <span style="color: #881280;">&lt;/div&gt;</span>

    <span style="color: #881280;">&lt;script </span><span style="color: #994500;">type</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"text/javascript"</span><span style="color: #994500;">src</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"http://twitter.com/javascripts/blogger.js"</span><span style="color: #881280;">&gt;&lt;/script&gt;</span>
    <span style="color: #881280;">&lt;script </span><span style="color: #994500;">text</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"text/javascript"</span><span style="color: #994500;">src</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"http://twitter.com/statuses/user_timeline/prlamnguyen.json?callback=twitterCallback2&amp;count=2"</span><span style="color: #881280;">&gt;&lt;/script&gt;</span>

<span style="color: #881280;">&lt;/body&gt;</span>
<span style="color: #881280;">&lt;/html&gt;</span></pre>
<p>The remain part we will use for replace with the content.</p>
<h3>header.php</h3>
<hr />
<p>The header file need to declare the blog title, description (if you are using SEO plugin, I don&#8217;t think this part is important), blog feed, pingback&#8230; And off course, you need to put your stylesheet here.</p>
<p>Put these code to your header for:</p>
<p>HTML type</p>
<pre class="html"><span style="color: #881280;">&lt;meta </span><span style="color: #994500;">http-equiv</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Content-Type"</span><span style="color: #994500;">content</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">bloginfo</span>(<span style="color: #eb7300;">'html_type'</span>); <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;">; charset=</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">bloginfo</span>(<span style="color: #eb7300;">'charset'</span>); <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;">"</span><span style="color: #881280;"> /&gt;</span></pre>
<p>Blog title</p>
<pre class="html"><span style="color: #881280;">&lt;title&gt;</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">wp_title</span>(<span style="color: #eb7300;">'&amp;laquo;'</span>, <span style="color: #881350;">true</span>, <span style="color: #eb7300;">'right'</span>); <span style="color: #003369;">bloginfo</span>(<span style="color: #eb7300;">'name'</span>); <span style="color: #dd0000;">?&gt;</span><span style="color: #881280;">&lt;/title&gt;</span></pre>
<p>Blog description</p>
<pre class="html"><span style="color: #881280;">&lt;meta </span><span style="color: #994500;">name</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"description"</span><span style="color: #994500;">content</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">bloginfo</span>(<span style="color: #eb7300;">'description'</span>); <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;">"</span><span style="color: #881280;"> /&gt;</span></pre>
<p>Feed and pingback</p>
<pre class="html"><span style="color: #881280;">&lt;link </span><span style="color: #994500;">rel</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"alternate"</span><span style="color: #994500;">type</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"application/rss+xml"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">bloginfo</span>(<span style="color: #eb7300;">'name'</span>); <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;"> RSS Feed"</span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">bloginfo</span>(<span style="color: #eb7300;">'rss2_url'</span>); <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;">"</span><span style="color: #881280;"> /&gt;</span>
<span style="color: #881280;">&lt;link </span><span style="color: #994500;">rel</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"alternate"</span><span style="color: #994500;">type</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"application/atom+xml"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">bloginfo</span>(<span style="color: #eb7300;">'name'</span>); <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;"> Atom Feed"</span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">bloginfo</span>(<span style="color: #eb7300;">'atom_url'</span>); <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;">"</span><span style="color: #881280;"> /&gt;</span>
<span style="color: #881280;">&lt;link </span><span style="color: #994500;">rel</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"pingback"</span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">bloginfo</span>(<span style="color: #eb7300;">'pingback_url'</span>); <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;">"</span><span style="color: #881280;"> /&gt;</span></pre>
<p>Because you will upload this theme to the themes folder, you need to gather the blog directory to import exactly the url to your css, javascript &#8230; files. Using this code, you will get the url to your template folder:</p>
<pre class="html"><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">bloginfo</span>(<span style="color: #eb7300;">'template_url'</span>); <span style="color: #dd0000;">?&gt;</span></pre>
<p>Link to your stylesheet using code above:</p>
<pre class="html"><span style="color: #dd0000;">&lt;?php</span>

  <span style="color: #881350;">print</span> <span style="color: #eb7300;">'&lt;style type="text/css" media="all"&gt;'</span>;

  <span style="color: #881350;">print</span> <span style="color: #eb7300;">'@import "'</span>.<span style="color: #003369;">get_bloginfo</span>(<span style="color: #eb7300;">'template_url'</span>).<span style="color: #eb7300;">'/reset.css";'</span>;
  <span style="color: #881350;">print</span> <span style="color: #eb7300;">'@import "'</span>.<span style="color: #003369;">get_bloginfo</span>(<span style="color: #eb7300;">'template_url'</span>).<span style="color: #eb7300;">'/style.css";'</span>;  
  <span style="color: #881350;">print</span> <span style="color: #eb7300;">'@import "'</span>.<span style="color: #003369;">get_bloginfo</span>(<span style="color: #eb7300;">'template_url'</span>).<span style="color: #eb7300;">'/pagenavi-css.css";'</span>; 

  <span style="color: #881350;">print</span> <span style="color: #eb7300;">'&lt;/style&gt;'</span>;

<span style="color: #dd0000;">?&gt;</span></pre>
<p>For more information about <em>bloginfo</em>, check this page <a href="http://codex.wordpress.org/Bloginfo">Template Tags/bloginfo</a>.</p>
<p>DON&#8217;T FORGET to put these code before closing the head tag</p>
<pre class="html"><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">wp_head</span>(); <span style="color: #dd0000;">?&gt;</span></pre>
<p>This is one of the most essential theme hooks. You use this hook by having your function echo output to the browser, or by having it perform background tasks. This is very important because all of the plugins installed will use this hook to output their code such as css and javascript to template header.</p>
<p>In this theme, you can see that I made the rounded border style for the categories link on header. It will be easy to list all category links if we just make simple links by using this code:</p>
<pre class="html">    <span style="color: #881280;">&lt;ul&gt;</span>
      <span style="color: #881280;">&lt;li&gt;&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">bloginfo</span>(<span style="color: #eb7300;">'url'</span>); <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;">"</span><span style="color: #881280;">&gt;</span>Home<span style="color: #881280;">&lt;/a&gt;&lt;/li&gt;</span>

      <span style="color: #dd0000;">&lt;?php</span> <span style="color: #881350;">echo</span> <span style="color: #003369;">wp_list_categories</span>(<span style="color: #eb7300;">'echo=0&amp;title_li='</span>); <span style="color: #dd0000;">?&gt;</span>

    <span style="color: #881280;">&lt;/ul&gt;</span></pre>
<p>However, this function just generate a list of category with links and we cannot put a span tag inside the link to make a rounded border style like what we do with the HTML template.</p>
<div class="bigimage"><img class="aligncenter size-full wp-image-2606" title="Wordpress Theme Rounded Border Link" src="http://aext.net/wp-contents/uploads/2010/01/Wordpress-Theme-Rounded-Border-Link.png" alt="" width="500" height="166" /></div>
<p>This is why we use this code instead;</p>
<pre class="html"><span style="color: #881280;">&lt;ul </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"topmenu"</span><span style="color: #881280;">&gt;</span>
    <span style="color: #881280;">&lt;li&gt;</span>
       <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">bloginfo</span>(<span style="color: #eb7300;">'url'</span>); <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;">"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Home Page"</span><span style="color: #881280;">&gt;&lt;span&gt;</span>Home<span style="color: #881280;">&lt;/span&gt;&lt;/a&gt;</span>
    <span style="color: #881280;">&lt;/li&gt;</span>

    <span style="color: #dd0000;">&lt;?php</span>

        <span style="color: #825900;">$args</span>=<span style="color: #881350;">array</span>(
            <span style="color: #eb7300;">'orderby'</span> =&gt; <span style="color: #eb7300;">'name'</span>,
            <span style="color: #eb7300;">'order'</span> =&gt; <span style="color: #eb7300;">'ASC'</span>
        );

        <span style="color: #825900;">$categories</span>=<span style="color: #003369;">get_categories</span>(<span style="color: #825900;">$args</span>);

            <span style="color: #881350;">foreach</span>(<span style="color: #825900;">$categories</span> <span style="color: #881350;">as</span> <span style="color: #825900;">$category</span>) {
                <span style="color: #881350;">echo</span> <span style="color: #eb7300;">'&lt;li&gt;'</span>;
                <span style="color: #881350;">echo</span> <span style="color: #eb7300;">'&lt;a href="'</span> . <span style="color: #003369;">get_category_link</span>( <span style="color: #825900;">$category</span>-&gt;term_id ) . <span style="color: #eb7300;">'" title="'</span> . <span style="color: #661aa9;">sprintf</span>( <span style="color: #003369;">__</span>( <span style="color: #eb7300;">"View all posts in %s"</span> ),                       <span style="color: #825900;">$category</span>-&gt;name ) . <span style="color: #eb7300;">'" '</span> . <span style="color: #eb7300;">'&gt;&lt;span&gt;'</span> . <span style="color: #825900;">$category</span>-&gt;name.<span style="color: #eb7300;">'&lt;/span&gt;&lt;/a&gt; &lt;/p&gt; '</span>;
                <span style="color: #881350;">echo</span> <span style="color: #eb7300;">'&lt;/li&gt;'</span>;
            }
    <span style="color: #dd0000;">?&gt;</span>

<span style="color: #881280;">&lt;/ul&gt;</span></pre>
<p>Now, with the css code I provided previous tutorial, we can build great rounded border link style.</p>
<p>[smartads]</p>
<h3>sidebar.php</h3>
<hr />
<p>Actually, the sidebar is very simple. Themes usually have at least 1 or 2 sidebars, in this case, we have one. Each section in the sidebar is known as a &#8220;widget&#8221; that you can add or remove, and move up or down. You can configure your sidebar by going to <strong>Appearance &gt; Widgets</strong>. Because nothing is special here, we only need to make it ready for widgets. That means you can add/remove widget in your sidebar in admin panel. In this case, I will keep the ads section as HTML, other widgets will be updated through widgets configuration.</p>
<p>In your sidebar.php, add these code:</p>
<pre class="html"><span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"sidebar"</span><span style="color: #881280;">&gt;</span>

    <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"widget"</span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"adblocks"</span><span style="color: #881280;">&gt;</span>

        <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">""</span><span style="color: #881280;">&gt;</span>
            <span style="color: #881280;">&lt;img </span><span style="color: #994500;">src</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">bloginfo</span>(<span style="color: #eb7300;">'template_directory'</span>); <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;">/images/ads/vivatheme.png"</span><span style="color: #994500;">alt</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Viva Theme"</span><span style="color: #881280;"> /&gt;</span>
        <span style="color: #881280;">&lt;/a&gt;</span>
        <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">""</span><span style="color: #881280;">&gt;</span>
            <span style="color: #881280;">&lt;img </span><span style="color: #994500;">src</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">bloginfo</span>(<span style="color: #eb7300;">'template_directory'</span>); <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;">/images/ads/pixelcrayons.jpg"</span><span style="color: #994500;">alt</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Pixel Crayons"</span><span style="color: #881280;"> /&gt;</span>
        <span style="color: #881280;">&lt;/a&gt;</span>
        <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">""</span><span style="color: #881280;">&gt;</span>
            <span style="color: #881280;">&lt;img </span><span style="color: #994500;">src</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">bloginfo</span>(<span style="color: #eb7300;">'template_directory'</span>); <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;">/images/ads/wpbest.gif"</span><span style="color: #994500;">alt</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"WPBEST"</span><span style="color: #881280;"> /&gt;</span>
        <span style="color: #881280;">&lt;/a&gt;</span>
        <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">""</span><span style="color: #881280;">&gt;</span>
            <span style="color: #881280;">&lt;img </span><span style="color: #994500;">src</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">bloginfo</span>(<span style="color: #eb7300;">'template_directory'</span>); <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;">/images/ads/buysellstockdesign.gif"</span><span style="color: #994500;">alt</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Buy Sell Stock Design"</span><span style="color: #881280;"> /&gt;</span>
        <span style="color: #881280;">&lt;/a&gt;</span>

    <span style="color: #881280;">&lt;/div&gt;</span>

    <span style="color: #dd0000;">&lt;?php</span> <span style="color: #881350;">if</span>( !<span style="color: #661aa9;">function_exists</span>(<span style="color: #eb7300;">'dynamic_sidebar'</span>) || !<span style="color: #003369;">dynamic_sidebar</span>() ) : <span style="color: #dd0000;">?&gt;</span>

    <span style="color: #dd0000;">&lt;?php</span> <span style="color: #881350;">endif</span>; <span style="color: #dd0000;">?&gt;</span>

<span style="color: #881280;">&lt;/div&gt;</span>

<span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"clear"</span><span style="color: #881280;">&gt;&lt;/div&gt;</span></pre>
<p>The code above will keep the ads section stays in the sidebar even when you add widgets in admin panel or not. Other widgets will be added through admin panel and be right next below to ads block.</p>
<p>However, that&#8217;s not enough. Because, in this case, we are setting up the sidebar widgets as div elements, we need to set up the sidebar format by using <em>register_sidebar()</em> in functions.php file. In functions.php file, add these code:</p>
<pre class="php"><em><span style="color: #236e25;">// register sidebars </span></em><span style="color: #881350;">if</span>( <span style="color: #661aa9;">function_exists</span>(<span style="color: #eb7300;">'register_sidebar'</span>)) {
    <span style="color: #003369;">register_sidebar</span>(<span style="color: #881350;">array</span>(
        <span style="color: #eb7300;">'name'</span> =&gt; <span style="color: #eb7300;">'Default sidebar'</span>,
        <span style="color: #eb7300;">'id'</span> =&gt; <span style="color: #eb7300;">'sidebar-1'</span>,
        <span style="color: #eb7300;">'before_widget'</span> =&gt; <span style="color: #eb7300;">'&lt;div class="widget" id="%1$s"&gt;'</span>,
        <span style="color: #eb7300;">'after_widget'</span> =&gt; <span style="color: #eb7300;">'&lt;/div&gt;'</span>,
        <span style="color: #eb7300;">'before_title'</span> =&gt; <span style="color: #eb7300;">'&lt;h3&gt;'</span>,
        <span style="color: #eb7300;">'after_title'</span> =&gt; <span style="color: #eb7300;">'&lt;/h3&gt;'</span>
    ));
}</pre>
<p>This code used for register the default side that all widgets inside it will come inside div element with class name <em>widget</em> and their id by plugin widgets. The title of each widget will be wrap by an <em>h3</em> tag.</p>
<p>That&#8217;s all you need for a sidebar with widget ready. Download this plugin <a href="http://wordpress.org/extend/plugins/wordpress-popular-posts/">WordPress Popular Posts</a>, install, active then drag the widget to the sidebar. Done!</p>
<h3>footer.php file</h3>
<hr />
<p>Honestly, there is nothing important here. Some blog design their beautiful footer with a lot of stuff, but in this case we only create two widgets for Flickr stream and Twitter update using javascript to make this tutorial simple. These widget display will depend on the user&#8217;s Flirkr and Twitter account, so we will create these widget display base on the options that user will put their account in. Luckily I published an useful posts &#8220;<a href="http://aext.net/2009/10/wordpress-theme-design-with-options-adminstration/">WordPress Theme Design with Options Adminstration</a>&#8220;. Now, you have to check this post first because it&#8217;s very complicated step that should not put here for a very long long long tutorial. It&#8217;s not necessary, but at least put some code for this tutorial more complete.</p>
<p>In functions.php file, put these code for theme options:</p>
<pre class="php"><em><span style="color: #236e25;">// theme options </span></em><span style="color: #825900;">$options</span> = <span style="color: #881350;">array</span>(

  <span style="color: #881350;">array</span>(    
    <span style="color: #eb7300;">"name"</span> =&gt; <span style="color: #eb7300;">"&lt;strong&gt;Flickr ID&lt;/strong&gt;"</span>,
    <span style="color: #eb7300;">"desc"</span> =&gt; <span style="color: #eb7300;">"Enter your Flickr ID to display Flickr Stream widget"</span>,
    <span style="color: #eb7300;">"id"</span> =&gt; <span style="color: #eb7300;">"flickr_account"</span>,
    <span style="color: #eb7300;">"default"</span> =&gt; <span style="color: #eb7300;">""</span>),

  <span style="color: #881350;">array</span>(    
    <span style="color: #eb7300;">"name"</span> =&gt; <span style="color: #eb7300;">"&lt;strong&gt;Twitter Account&lt;/strong&gt;"</span>,
    <span style="color: #eb7300;">"desc"</span> =&gt; <span style="color: #eb7300;">"Enter your Twitter username to display Twitter Update widget"</span>,
    <span style="color: #eb7300;">"id"</span> =&gt; <span style="color: #eb7300;">"twitter_account"</span>,
    <span style="color: #eb7300;">"default"</span> =&gt; <span style="color: #eb7300;">"prlamnguyen"</span>),

);</pre>
<p>These lines of code will control the form submission of the theme options:</p>
<pre class="php"><span style="color: #881350;">function</span> <span style="color: #003369;">frozenflirt_options</span>() {
  <span style="color: #881350;">global</span> <span style="color: #825900;">$options</span>;

  <span style="color: #881350;">if</span>(<span style="color: #eb7300;">'theme_save'</span>== <span style="color: #825900;">$_REQUEST</span>[<span style="color: #eb7300;">'action'</span>] ) {

    <span style="color: #881350;">foreach</span>(<span style="color: #825900;">$options</span> <span style="color: #881350;">as</span> <span style="color: #825900;">$value</span>) {
     <span style="color: #881350;">if</span>( !<span style="color: #003369;">isset</span>( <span style="color: #825900;">$_REQUEST</span>[ <span style="color: #825900;">$value</span>[<span style="color: #eb7300;">'id'</span>] ] ) ) {  } <span style="color: #881350;">else</span> { <span style="color: #003369;">update_option</span>( <span style="color: #825900;">$value</span>[<span style="color: #eb7300;">'id'</span>], <span style="color: #661aa9;">stripslashes</span>(<span style="color: #825900;">$_REQUEST</span>[ <span style="color: #825900;">$value</span>[<span style="color: #eb7300;">'id'</span>]])); } }
     <span style="color: #881350;">if</span>(<span style="color: #661aa9;">stristr</span>(<span style="color: #825900;">$_SERVER</span>[<span style="color: #eb7300;">'REQUEST_URI'</span>],<span style="color: #eb7300;">'&amp;saved=true'</span>)) {
     <span style="color: #825900;">$location</span> = <span style="color: #825900;">$_SERVER</span>[<span style="color: #eb7300;">'REQUEST_URI'</span>];
    } <span style="color: #881350;">else</span> {
     <span style="color: #825900;">$location</span> = <span style="color: #825900;">$_SERVER</span>[<span style="color: #eb7300;">'REQUEST_URI'</span>] . <span style="color: #eb7300;">"&amp;saved=true"</span>;
    }

    <span style="color: #661aa9;">header</span>(<span style="color: #eb7300;">"Location: </span><span style="color: #c94b16;">$location</span><span style="color: #eb7300;">"</span>);
    <span style="color: #881350;">die</span>;

  } <span style="color: #881350;">else</span> <span style="color: #881350;">if</span>(<span style="color: #eb7300;">'theme_reset'</span> == <span style="color: #825900;">$_REQUEST</span>[<span style="color: #eb7300;">'action'</span>] ) {

    <span style="color: #881350;">foreach</span>(<span style="color: #825900;">$options</span> <span style="color: #881350;">as</span> <span style="color: #825900;">$value</span>) {
     <span style="color: #003369;">delete_option</span>( <span style="color: #825900;">$value</span>[<span style="color: #eb7300;">'id'</span>] );
     <span style="color: #825900;">$location</span> = <span style="color: #825900;">$_SERVER</span>[<span style="color: #eb7300;">'REQUEST_URI'</span>] . <span style="color: #eb7300;">"&amp;reset=true"</span>;
    }

    <span style="color: #661aa9;">header</span>(<span style="color: #eb7300;">"Location: </span><span style="color: #c94b16;">$location</span><span style="color: #eb7300;">"</span>);
    <span style="color: #881350;">die</span>;

  }

  <span style="color: #003369;">add_theme_page</span>(<span style="color: #eb7300;">'FrozenFlirt Theme Setting'</span>, <span style="color: #eb7300;">'FrozenFlirt Theme Setting'</span>, <span style="color: #0000ff;">10</span>, <span style="color: #eb7300;">'frozenflirt-settings'</span>, <span style="color: #eb7300;">'frozenflirt_admin'</span>);
}</pre>
<p>And these code for the UI in admin panel:</p>
<pre class="php"><span style="color: #dd0000;">&lt;?php</span>
<span style="color: #881350;">function</span> <span style="color: #003369;">frozenflirt_admin</span>() {
    <span style="color: #881350;">global</span> <span style="color: #825900;">$options</span>;
<span style="color: #dd0000;">?&gt;</span>
<span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"wrap"</span><span style="color: #881280;">&gt;</span>
  <span style="color: #881280;">&lt;h2 </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"alignleft"</span><span style="color: #881280;">&gt;</span>Theme Setting<span style="color: #881280;">&lt;/h2&gt;</span>
  <span style="color: #881280;">&lt;br </span><span style="color: #994500;">clear</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"all"</span><span style="color: #881280;"> /&gt;</span>

  <span style="color: #dd0000;">&lt;?php</span>
    <em><span style="color: #236e25;">//Check if settings saved! </span></em>    <span style="color: #881350;">if</span>( <span style="color: #825900;">$_REQUEST</span>[<span style="color: #eb7300;">'saved'</span>] ) {
  <span style="color: #dd0000;">?&gt;</span>
        <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"updated fade"</span><span style="color: #881280;">&gt;&lt;p&gt;&lt;strong&gt;</span>Setting Saved<span style="color: #881280;">&lt;/strong&gt;&lt;/p&gt;&lt;/div&gt;</span>
  <span style="color: #dd0000;">&lt;?php</span> } <span style="color: #dd0000;">?&gt;</span>

<span style="color: #881280;">&lt;form </span><span style="color: #994500;">method</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"post"</span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"myForm"</span><span style="color: #881280;">&gt;</span>
<span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"poststuff"</span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"metabox-holder"</span><span style="color: #881280;">&gt;</span>

 <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"stuffbox"</span><span style="color: #881280;">&gt;</span>
  <span style="color: #881280;">&lt;h3&gt;</span>Footer Setting<span style="color: #881280;">&lt;/h3&gt;</span>
  <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"inside"</span><span style="color: #881280;">&gt;</span>
    <span style="color: #881280;">&lt;table </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"form-table"</span><span style="color: #994500;">style</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"width: auto"</span><span style="color: #881280;">&gt;</span>
    <span style="color: #dd0000;">&lt;?php</span>
     <span style="color: #881350;">foreach</span>(<span style="color: #825900;">$options</span> <span style="color: #881350;">as</span> <span style="color: #825900;">$value</span>) {
      <span style="color: #881350;">switch</span>( <span style="color: #825900;">$value</span>[<span style="color: #eb7300;">'id'</span>] ) {
        <span style="color: #881350;">case</span> <span style="color: #eb7300;">"flickr_account"</span>: <span style="color: #dd0000;">?&gt;</span>
        <span style="color: #881280;">&lt;tr&gt;</span>
        <span style="color: #881280;">&lt;th </span><span style="color: #994500;">scope</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"row"</span><span style="color: #881280;">&gt;</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #881350;">echo</span> <span style="color: #825900;">$value</span>[<span style="color: #eb7300;">'name'</span>]; <span style="color: #dd0000;">?&gt;</span><span style="color: #881280;">&lt;br /&gt;</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #881350;">echo</span> <span style="color: #825900;">$value</span>[<span style="color: #eb7300;">'desc'</span>]; <span style="color: #dd0000;">?&gt;</span><span style="color: #881280;">&lt;/th&gt;</span>
        <span style="color: #881280;">&lt;td&gt;</span>
         <span style="color: #881280;">&lt;input </span><span style="color: #994500;">name</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #881350;">echo</span> <span style="color: #825900;">$value</span>[<span style="color: #eb7300;">'id'</span>]; <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;">"</span><span style="color: #881280;">                 </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #881350;">echo</span> <span style="color: #825900;">$value</span>[<span style="color: #eb7300;">'id'</span>]; <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;">"</span><span style="color: #994500;">type</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"text"</span><span style="color: #881280;">                 </span><span style="color: #994500;">value</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">get_option</span>(<span style="color: #825900;">$value</span>[<span style="color: #eb7300;">'id'</span>])?<span style="color: #661aa9;">printf</span>(<span style="color: #003369;">get_option</span>(<span style="color: #825900;">$value</span>[<span style="color: #eb7300;">'id'</span>])): <span style="color: #661aa9;">printf</span>(<span style="color: #825900;">$value</span>[<span style="color: #eb7300;">'default'</span>]) <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;">"</span><span style="color: #881280;"> /&gt;</span>
        <span style="color: #881280;">&lt;/td&gt;</span>
        <span style="color: #881280;">&lt;/tr&gt;</span>

      <span style="color: #dd0000;">&lt;?php</span> <span style="color: #881350;">break</span>;
        <span style="color: #881350;">case</span> <span style="color: #eb7300;">"twitter_account"</span>: <span style="color: #dd0000;">?&gt;</span>
        <span style="color: #881280;">&lt;tr&gt;</span>
        <span style="color: #881280;">&lt;th </span><span style="color: #994500;">scope</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"row"</span><span style="color: #881280;">&gt;</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #881350;">echo</span> <span style="color: #825900;">$value</span>[<span style="color: #eb7300;">'name'</span>]; <span style="color: #dd0000;">?&gt;</span><span style="color: #881280;">&lt;br /&gt;</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #881350;">echo</span> <span style="color: #825900;">$value</span>[<span style="color: #eb7300;">'desc'</span>]; <span style="color: #dd0000;">?&gt;</span><span style="color: #881280;">&lt;/th&gt;</span>
        <span style="color: #881280;">&lt;td&gt;</span>
         <span style="color: #881280;">&lt;input </span><span style="color: #994500;">name</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #881350;">echo</span> <span style="color: #825900;">$value</span>[<span style="color: #eb7300;">'id'</span>]; <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;">"</span><span style="color: #881280;">                 </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #881350;">echo</span> <span style="color: #825900;">$value</span>[<span style="color: #eb7300;">'id'</span>]; <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;">"</span><span style="color: #994500;">type</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"text"</span><span style="color: #881280;">                 </span><span style="color: #994500;">value</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">get_option</span>(<span style="color: #825900;">$value</span>[<span style="color: #eb7300;">'id'</span>])?<span style="color: #661aa9;">printf</span>(<span style="color: #003369;">get_option</span>(<span style="color: #825900;">$value</span>[<span style="color: #eb7300;">'id'</span>])): <span style="color: #661aa9;">printf</span>(<span style="color: #825900;">$value</span>[<span style="color: #eb7300;">'default'</span>]) <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;">"</span><span style="color: #881280;"> /&gt;</span>
        <span style="color: #881280;">&lt;/td&gt;</span>
        <span style="color: #881280;">&lt;/tr&gt;</span>

      <span style="color: #dd0000;">&lt;?php</span> <span style="color: #881350;">break</span>;
        }
    }
    <span style="color: #dd0000;">?&gt;</span>
   <span style="color: #881280;">&lt;/table&gt;</span>
  <span style="color: #881280;">&lt;/div&gt;</span>
 <span style="color: #881280;">&lt;/div&gt;</span>  

<span style="color: #881280;">&lt;/div&gt;</span>
<span style="color: #881280;">&lt;input </span><span style="color: #994500;">name</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"theme_save"</span><span style="color: #994500;">type</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"submit"</span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"button-primary"</span><span style="color: #994500;">value</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Save changes"</span><span style="color: #881280;"> /&gt;</span>
<span style="color: #881280;">&lt;input </span><span style="color: #994500;">type</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"hidden"</span><span style="color: #994500;">name</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"action"</span><span style="color: #994500;">value</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"theme_save"</span><span style="color: #881280;"> /&gt;</span>
<span style="color: #881280;">&lt;/form&gt;</span>

<span style="color: #881280;">&lt;form </span><span style="color: #994500;">method</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"post"</span><span style="color: #881280;">&gt;</span>
<span style="color: #881280;">&lt;input </span><span style="color: #994500;">name</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"theme_reset"</span><span style="color: #994500;">type</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"submit"</span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"button-primary"</span><span style="color: #994500;">value</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Reset"</span><span style="color: #881280;"> /&gt;</span>
<span style="color: #881280;">&lt;input </span><span style="color: #994500;">type</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"hidden"</span><span style="color: #994500;">name</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"action"</span><span style="color: #994500;">value</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"theme_reset"</span><span style="color: #881280;"> /&gt;</span>
<span style="color: #881280;">&lt;/form&gt;</span>

<span style="color: #881280;">&lt;/div&gt;</span>
<span style="color: #dd0000;">&lt;?php</span>
}
<span style="color: #dd0000;">?&gt;</span></pre>
<p>Your theme options adminstration will look like:</p>
<div class="bigimage"><img class="aligncenter size-full wp-image-2608" title="Wordpress Theme Options" src="http://aext.net/wp-contents/uploads/2010/01/Wordpress-Theme-Options.png" alt="" width="500" height="270" /></div>
<p>We are good now with the theme options. Let&#8217;s get these value to display in the theme. In your footer.php, insert these code to your Twitter widgets to get twitter account name from theme options:</p>
<pre class="html"><span style="color: #881280;">&lt;script </span><span style="color: #994500;">type</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"text/javascript"</span><span style="color: #994500;">src</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"http://twitter.com/javascripts/blogger.js"</span><span style="color: #881280;">&gt;&lt;/script&gt;</span>
<span style="color: #881280;">&lt;script </span><span style="color: #994500;">type</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"text/javascript"</span><span style="color: #994500;">src</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"http://twitter.com/statuses/user_timeline/</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #881350;">if</span>(!<span style="color: #003369;">get_option</span>(<span style="color: #eb7300;">'twitter_account'</span>)) { <span style="color: #881350;">echo</span> <span style="color: #eb7300;">'prlamnguyen'</span>; } <span style="color: #881350;">else</span> { <span style="color: #661aa9;">printf</span>(<span style="color: #003369;">get_option</span>(<span style="color: #eb7300;">'twitter_account'</span>)); } <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;">.json?callback=twitterCallback2&amp;count=2"</span><span style="color: #881280;">&gt;&lt;/script&gt;</span></pre>
<p>In this code above, if the option value of twitter_account doesn&#8217;t exist, this widget will display twitter update from my twitter account by default. <img src='http://aext.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>With Flickr Stream widget, go back to header.php file to edit because I put the jQuery code to get stream from specific account on header.php file. I&#8217;m so sorry! If you want, move this code block to the footer.php file. That&#8217;s fine!</p>
<pre class="html"><span style="color: #881280;">&lt;script </span><span style="color: #994500;">type</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"text/javascript"</span><span style="color: #881280;">&gt;</span>

        $(document).<span style="color: #003369;">ready</span>(<span style="color: #881350;">function</span>() {

            <span style="color: #881350;">var</span> id = <span style="color: #760f15;">'</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #661aa9;">printf</span>(<span style="color: #003369;">get_option</span>(<span style="color: #eb7300;">'flickr_account'</span>)); <span style="color: #dd0000;">?&gt;</span><span style="color: #760f15;">'</span>;
            <span style="color: #003369;">flickr</span>(id);

        });

<span style="color: #881280;">&lt;/script&gt;</span></pre>
<p>Alright, now you have done for the three files that will used in all pages. Now, we continue to go forward to other pages that display in homepage, post pages, categories pages&#8230;</p>
<h3>index.php</h3>
<hr />
<p>This file will used for display in the main page of your blog. It usually displays a number of recent articles. The number of posts will be display was set up in your <strong>WordPress Admin &gt; Setting &gt; Reading</strong>as below:</p>
<div class="bigimage"><img class="aligncenter size-full wp-image-2589" title="WordPress theme setting up number of posts willl be displayed in homepage" src="http://aext.net/wp-contents/uploads/2010/01/WordPress-theme-setting-up-number-of-posts-willl-be-displayed-in-homepage.png" alt="" width="500" height="294" /></div>
<p>By default, you don&#8217;t need to query posts in homepage, the only code for the loop of display post in homepage is:</p>
<pre class="html"><span style="color: #dd0000;">&lt;?php</span>

<em><span style="color: #236e25;">//The Loop </span></em><span style="color: #881350;">if</span>( <span style="color: #003369;">have_posts</span>() ) : 

    <span style="color: #881350;">while</span>( <span style="color: #003369;">have_posts</span>() ) : <span style="color: #003369;">the_post</span>();

        <em><span style="color: #236e25;">//Posts in the loop </span></em>    
    <span style="color: #881350;">endwhile</span>;

<span style="color: #881350;">else</span>:

        <em><span style="color: #236e25;">//No post in homepage ????? </span></em>     
<span style="color: #881350;">endif</span>;

<span style="color: #dd0000;">?&gt;</span></pre>
<p>However, sometime we need to display post in homepage with conditions. An example with Noupe.com, they are using the Community News which all of news were submit will go to News category, but they don&#8217;t want to display a lot of community news in homepage. The best way to do is override and replace the main query in homepage. In the case I have just mentioned(At this time, Noupe has disabled Community submission !!!), the replaced query will be:</p>
<pre class="html"><span style="color: #dd0000;">&lt;?php</span>

<em><span style="color: #236e25;">//Begin replace the main query </span></em><span style="color: #003369;">query_posts</span>(<span style="color: #eb7300;">'cat=-155'</span>); <em><span style="color: #236e25;">//155 is the id of Community News category </span></em>
<em><span style="color: #236e25;">//The Loop </span></em><span style="color: #881350;">if</span>( <span style="color: #003369;">have_posts</span>() ) : 

    <span style="color: #881350;">while</span>( <span style="color: #003369;">have_posts</span>() ) : <span style="color: #003369;">the_post</span>();

        <em><span style="color: #236e25;">//Posts in the loop </span></em>    
    <span style="color: #881350;">endwhile</span>;

<span style="color: #881350;">else</span>:

        <em><span style="color: #236e25;">//No post in homepage ????? </span></em>     
<span style="color: #881350;">endif</span>;

<em><span style="color: #236e25;">//Reset the query </span></em><span style="color: #003369;">wp_reset_query</span>();

<span style="color: #dd0000;">?&gt;</span></pre>
<p>With the query_posts, you can change the order, number of posts&#8230;. I would like to forward a link to <a href="http://codex.wordpress.org/Template_Tags/query_posts">Template Tags/query posts</a> to check more information and usages.</p>
<p>Way back to the tutorial, you already knew how to use the loop in display posts, now we begin to work with our index.php. But at first, you have to clean this index.php because we have 4 blocks of post in HTML template. Keep only one post excerpt, remove all of others.</p>
<p>Before starting write code for display post excerpts, we need to look back to the split files. You remember that we split our HTML file into 3 files: <em>header.php</em>, <em>sidebar.php</em> and <em>footer.php</em>. Now, we need to include them again. In index.php file, put your header, sidebar and footer:</p>
<pre class="html"><span style="color: #dd0000;">&lt;?php</span>

<em><span style="color: #236e25;">/**  * @package WordPress  * @subpackage FrozenFlirt_Theme  */</span></em>
<span style="color: #dd0000;">?&gt;</span>

<span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">get_header</span>(); <span style="color: #dd0000;">?&gt;</span>

            <span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"main-content"</span><span style="color: #881280;">&gt;</span>

                ..........

            <span style="color: #881280;">&lt;/div&gt;</span>

            <span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">get_sidebar</span>(); <span style="color: #dd0000;">?&gt;</span>

<span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">get_footer</span>(); <span style="color: #dd0000;">?&gt;</span></pre>
<p>In main content elements, we write a loop of post to display:</p>
<pre class="html"><span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"main-content"</span><span style="color: #881280;">&gt;</span>
  <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"container"</span><span style="color: #881280;">&gt;</span>

    <span style="color: #dd0000;">&lt;?php</span>

    <span style="color: #881350;">if</span>(<span style="color: #003369;">have_posts</span>()) : <span style="color: #881350;">while</span>(<span style="color: #003369;">have_posts</span>()) : <span style="color: #003369;">the_post</span>();

    <span style="color: #dd0000;">?&gt;</span>

    <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"post exerpt clearfix"</span><span style="color: #881280;">&gt;</span>
      <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #881280;">&gt;</span>
        <span style="color: #881280;">&lt;img </span><span style="color: #994500;">alt</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"ahh ahh ahh"</span><span style="color: #994500;">src</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"images/post-image-1.png"</span><span style="color: #994500;">width</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"200"</span><span style="color: #994500;">height</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"200"</span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"thumbnail"</span><span style="color: #881280;"> /&gt;</span>
      <span style="color: #881280;">&lt;/a&gt;</span>

      <span style="color: #881280;">&lt;h2&gt;&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #994500;">rel</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"nofollow"</span><span style="color: #881280;">&gt;</span>Fronze Flirt Theme<span style="color: #881280;">&lt;/a&gt;&lt;/h2&gt;</span>

      <span style="color: #881280;">&lt;small&gt;</span>Written by <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Lam Nguyen"</span><span style="color: #881280;">&gt;</span>Lam Nguyen<span style="color: #881280;">&lt;/a&gt;</span> on <span style="color: #881280;">&lt;strong&gt;</span>Dec 11th<span style="color: #881280;">&lt;/strong&gt;</span> in <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Tutorial Category"</span><span style="color: #881280;">&gt;</span>Tutorials<span style="color: #881280;">&lt;/a&gt;&lt;/small&gt;</span>

      <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"summary"</span><span style="color: #881280;">&gt;</span>
        <span style="color: #881280;">&lt;p&gt;</span>Lorem ipsum dolor sit amet, this is bold text consectetur adipiscing elit. This font is in italic cras lacinia pellentesque elit nec sodales. Etiam vehicula egestas interdum. Nulla facilisi. In at lectus odio, quis iaculis dui. <span style="color: #881280;">&lt;/p&gt;</span>
        <span style="color: #881280;">&lt;p&gt;&lt;a </span><span style="color: #994500;">rel</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"nofollow"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Read more this post"</span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #881280;">&gt;</span>Continue Reading <span style="color: #881280;">&amp;raquo;&lt;/a&gt;&lt;/p&gt;</span>
      <span style="color: #881280;">&lt;/div&gt;</span>

    <span style="color: #881280;">&lt;/div&gt;</span>

    <span style="color: #dd0000;">&lt;?php</span> <span style="color: #881350;">endwhile</span>; <span style="color: #dd0000;">?&gt;</span>

        <span style="color: #dd0000;">&lt;?php</span> <span style="color: #881350;">if</span>(<span style="color: #661aa9;">function_exists</span>(<span style="color: #eb7300;">'wp_pagenavi'</span>)) : <span style="color: #dd0000;">?&gt;</span>
            <span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">wp_pagenavi</span>() <span style="color: #dd0000;">?&gt;</span>
        <span style="color: #dd0000;">&lt;?php</span> <span style="color: #881350;">else</span> : <span style="color: #dd0000;">?&gt;</span>
            <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"navigation"</span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"pagenavi"</span><span style="color: #881280;">&gt;</span>
                <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"alignleft"</span><span style="color: #881280;">&gt;</span>
                    <span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">next_posts_link</span>(<span style="color: #003369;">__</span>(<span style="color: #eb7300;">'&amp;laquo; Older Entries'</span>,<span style="color: #eb7300;">'arclite'</span>)) <span style="color: #dd0000;">?&gt;</span>
                <span style="color: #881280;">&lt;/div&gt;</span>
                <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"alignright"</span><span style="color: #881280;">&gt;</span>
                    <span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">previous_posts_link</span>(<span style="color: #003369;">__</span>(<span style="color: #eb7300;">'Newer Entries &amp;raquo;'</span>,<span style="color: #eb7300;">'arclite'</span>)) <span style="color: #dd0000;">?&gt;</span>
                <span style="color: #881280;">&lt;/div&gt;</span>
                <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"clear"</span><span style="color: #881280;">&gt;&lt;/div&gt;</span>
            <span style="color: #881280;">&lt;/div&gt;</span>
        <span style="color: #dd0000;">&lt;?php</span> <span style="color: #881350;">endif</span>; <span style="color: #dd0000;">?&gt;</span>

    <span style="color: #dd0000;">&lt;?php</span> <span style="color: #881350;">else</span>: <span style="color: #dd0000;">?&gt;</span>
        <span style="color: #881280;">&lt;p&gt;</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #661aa9;">printf</span>(<span style="color: #eb7300;">"Sorry, no posts matched your criteria."</span>); <span style="color: #dd0000;">?&gt;</span><span style="color: #881280;">&lt;/p&gt;</span>
    <span style="color: #dd0000;">&lt;?php</span> <span style="color: #881350;">endif</span>; <span style="color: #dd0000;">?&gt;</span>

  <span style="color: #881280;">&lt;/div&gt;</span>
<span style="color: #881280;">&lt;/div&gt;</span></pre>
<p>This loop will display the number of post with the same title, thumbnail, description&#8230; because we haven&#8217;t change the code to display correct post title, post description&#8230; These code below is used for replace the HTML in the loop:</p>
<pre class="html"><span style="color: #dd0000;">&lt;?php</span>
    <span style="color: #881350;">if</span>(<span style="color: #003369;">have_posts</span>()) : <span style="color: #881350;">while</span>(<span style="color: #003369;">have_posts</span>()) : <span style="color: #003369;">the_post</span>();          
<span style="color: #dd0000;">?&gt;</span>
<span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"post excerpt clearfix"</span><span style="color: #881280;">&gt;</span>
  <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">the_permalink</span>() <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;">"</span><span style="color: #881280;">&gt;</span>
  <span style="color: #dd0000;">&lt;?php</span>
        <span style="color: #881350;">if</span>( <span style="color: #003369;">has_post_thumbnail</span>() ) {
            <span style="color: #003369;">the_post_thumbnail</span>(<span style="color: #881350;">array</span>(<span style="color: #0000ff;">200</span>,<span style="color: #0000ff;">200</span>), <span style="color: #881350;">array</span>(<span style="color: #eb7300;">'class'</span> =&gt; <span style="color: #eb7300;">'thumbnail'</span>));
        } <span style="color: #881350;">else</span> {
            <em><span style="color: #236e25;">// Who doesn't want a thumbnail?? </span></em>        }
  <span style="color: #dd0000;">?&gt;</span>
  <span style="color: #881280;">&lt;/a&gt;</span>
  <span style="color: #881280;">&lt;h2&gt;&lt;a </span><span style="color: #994500;">rel</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"nofollow"</span><span style="color: #881280;">  </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">the_permalink</span>() <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;">"</span><span style="color: #881280;">&gt;</span>
    <span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">the_title</span>(); <span style="color: #dd0000;">?&gt;</span>
    <span style="color: #881280;">&lt;/a&gt;&lt;/h2&gt;</span>

  <span style="color: #881280;">&lt;small&gt;</span>
        Written by <span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">the_author_posts_link</span>(); <span style="color: #dd0000;">?&gt;</span>
                on <span style="color: #881280;">&lt;strong&gt;</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">the_time</span>(<span style="color: #eb7300;">'F jS'</span>) <span style="color: #dd0000;">?&gt;</span><span style="color: #881280;">&lt;/strong&gt;</span>
                in <span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">the_category</span>(<span style="color: #eb7300;">', '</span>); <span style="color: #dd0000;">?&gt;</span>
  <span style="color: #881280;">&lt;/small&gt;</span>

  <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"summary"</span><span style="color: #881280;">&gt;</span>
    <span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">the_content</span>( <span style="color: #eb7300;">'Continue Reading &amp;raquo;'</span> ); <span style="color: #dd0000;">?&gt;</span>
  <span style="color: #881280;">&lt;/div&gt;</span>

<span style="color: #881280;">&lt;/div&gt;</span>
<span style="color: #dd0000;">&lt;?php</span> <span style="color: #881350;">endwhile</span>; <span style="color: #dd0000;">?&gt;</span></pre>
<p>Wow, we&#8217;re going to the most interesting feature of WordPress 2.9: <strong>Thumbnail Generation for Post</strong>. You remember, in the past, how we made thumbnail for a post? It was really a nightmare with a lot of code and stuff. Today, everything has changed. With few lines of codes, you can insert thumbnail for posts easily.</p>
<p>In functions.php file, insert these code to active the new feature:</p>
<pre class="php"><span style="color: #003369;">add_theme_support</span>( <span style="color: #eb7300;">'post-thumbnails'</span>, <span style="color: #881350;">array</span>( <span style="color: #eb7300;">'post'</span> ) );</pre>
<p>You can make this feature active for posts, pages&#8230; but for posts only in this case. Display the thumbnail within the loop:</p>
<pre class="html"><span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">the_permalink</span>() <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;">"</span><span style="color: #881280;">&gt;</span>
    <span style="color: #dd0000;">&lt;?php</span>
        <span style="color: #881350;">if</span>( <span style="color: #003369;">has_post_thumbnail</span>() ) {
            <span style="color: #003369;">the_post_thumbnail</span>(<span style="color: #881350;">array</span>(<span style="color: #0000ff;">200</span>,<span style="color: #0000ff;">200</span>), <span style="color: #881350;">array</span>(<span style="color: #eb7300;">'class'</span> =&gt; <span style="color: #eb7300;">'thumbnail'</span>));
        } <span style="color: #881350;">else</span> {
            <em><span style="color: #236e25;">// Who doesn't want a thumbnail?? </span></em>        }
    <span style="color: #dd0000;">?&gt;</span>
<span style="color: #881280;">&lt;/a&gt;</span></pre>
<p>This code will display the thumbnail with dimension: 200&#215;200 pixels and the img tag is with class name thumbnail. The thumbnail will be added when writing post:</p>
<div class="bigimage"><img class="aligncenter size-full wp-image-2594" title="WordPress theme using thumbnail generation feature" src="http://aext.net/wp-contents/uploads/2010/01/WordPress-theme-using-thumbnail-generation-feature-e1262930429762.png" alt="" width="500" height="369" /></div>
<p>I recommend this post for new feature Post Thumbnail references: <a href="http://www.kremalicious.com/2009/12/wordpress-post-thumbnails/">Using The New Post Thumbnail Feature In WordPress 2.9</a>.</p>
<h3>archive.php</h3>
<hr />
<p>This file will used for display category archive, tag archive&#8230; The easiest way is copy all code of index.php page and past it to archive.php because tag or category archive usually display in the same way as index page. In WordPress, when develop theme, the posts query was already made by WordPress, so that&#8217;s why we need just copy and paste content of index.php to the archive.php file. As I said above, if you need to display something different such as: posts order, number of posts will be displayed&#8230; just use the <em>query_posts()</em>function to override and replace the main query for the page.</p>
<p>However, in archive.php file, you need to notify users which page they are on. Insert these code on the top, before display the loop of posts:</p>
<pre class="html">                ...

                <span style="color: #dd0000;">&lt;?php</span>

                <span style="color: #881350;">if</span>(<span style="color: #003369;">have_posts</span>()) :

                <span style="color: #dd0000;">?&gt;</span>

      <span style="color: #dd0000;">&lt;?php</span> <span style="color: #825900;">$post</span> = <span style="color: #825900;">$posts</span>[<span style="color: #0000ff;">0</span>]; <em><span style="color: #236e25;">// Hack. Set $post so that the_date() works. </span></em><span style="color: #dd0000;">?&gt;</span>
      <span style="color: #dd0000;">&lt;?php</span> <em><span style="color: #236e25;">/* If this is a category archive */</span></em> <span style="color: #881350;">if</span>(<span style="color: #003369;">is_category</span>()) { <span style="color: #dd0000;">?&gt;</span>
        <span style="color: #881280;">&lt;h2 </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"pagetitle"</span><span style="color: #881280;">&gt;</span>Archive for the <span style="color: #881280;">&amp;#8216;</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">single_cat_title</span>(); <span style="color: #dd0000;">?&gt;</span><span style="color: #881280;">&amp;#8217;</span> Category<span style="color: #881280;">&lt;/h2&gt;</span>
      <span style="color: #dd0000;">&lt;?php</span> <em><span style="color: #236e25;">/* If this is a tag archive */</span></em> } <span style="color: #881350;">elseif</span>( <span style="color: #003369;">is_tag</span>() ) { <span style="color: #dd0000;">?&gt;</span>
        <span style="color: #881280;">&lt;h2 </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"pagetitle"</span><span style="color: #881280;">&gt;</span>Posts Tagged <span style="color: #881280;">&amp;#8216;</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">single_tag_title</span>(); <span style="color: #dd0000;">?&gt;</span><span style="color: #881280;">&amp;#8217;&lt;/h2&gt;</span>
      <span style="color: #dd0000;">&lt;?php</span> <em><span style="color: #236e25;">/* If this is a daily archive */</span></em> } <span style="color: #881350;">elseif</span>(<span style="color: #003369;">is_day</span>()) { <span style="color: #dd0000;">?&gt;</span>
        <span style="color: #881280;">&lt;h2 </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"pagetitle"</span><span style="color: #881280;">&gt;</span>Archive for <span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">the_time</span>(<span style="color: #eb7300;">'F jS, Y'</span>); <span style="color: #dd0000;">?&gt;</span><span style="color: #881280;">&lt;/h2&gt;</span>
      <span style="color: #dd0000;">&lt;?php</span> <em><span style="color: #236e25;">/* If this is a monthly archive */</span></em> } <span style="color: #881350;">elseif</span>(<span style="color: #003369;">is_month</span>()) { <span style="color: #dd0000;">?&gt;</span>
        <span style="color: #881280;">&lt;h2 </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"pagetitle"</span><span style="color: #881280;">&gt;</span>Archive for <span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">the_time</span>(<span style="color: #eb7300;">'F, Y'</span>); <span style="color: #dd0000;">?&gt;</span><span style="color: #881280;">&lt;/h2&gt;</span>
      <span style="color: #dd0000;">&lt;?php</span> <em><span style="color: #236e25;">/* If this is a yearly archive */</span></em> } <span style="color: #881350;">elseif</span>(<span style="color: #003369;">is_year</span>()) { <span style="color: #dd0000;">?&gt;</span>
        <span style="color: #881280;">&lt;h2 </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"pagetitle"</span><span style="color: #881280;">&gt;</span>Archive for <span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">the_time</span>(<span style="color: #eb7300;">'Y'</span>); <span style="color: #dd0000;">?&gt;</span><span style="color: #881280;">&lt;/h2&gt;</span>
      <span style="color: #dd0000;">&lt;?php</span> <em><span style="color: #236e25;">/* If this is an author archive */</span></em> } <span style="color: #881350;">elseif</span>(<span style="color: #003369;">is_author</span>()) { <span style="color: #dd0000;">?&gt;</span>
        <span style="color: #881280;">&lt;h2 </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"pagetitle"</span><span style="color: #881280;">&gt;</span>Author Archive<span style="color: #881280;">&lt;/h2&gt;</span>
      <span style="color: #dd0000;">&lt;?php</span> <em><span style="color: #236e25;">/* If this is a paged archive */</span></em> } <span style="color: #881350;">elseif</span>(<span style="color: #003369;">isset</span>(<span style="color: #825900;">$_GET</span>[<span style="color: #eb7300;">'paged'</span>]) &amp;&amp; !<span style="color: #003369;">empty</span>(<span style="color: #825900;">$_GET</span>[<span style="color: #eb7300;">'paged'</span>])) { <span style="color: #dd0000;">?&gt;</span>
        <span style="color: #881280;">&lt;h2 </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"pagetitle"</span><span style="color: #881280;">&gt;</span>Blog Archives<span style="color: #881280;">&lt;/h2&gt;</span>
      <span style="color: #dd0000;">&lt;?php</span> } <span style="color: #dd0000;">?&gt;</span>

                <span style="color: #dd0000;">&lt;?php</span>

                    <span style="color: #881350;">while</span>(<span style="color: #003369;">have_posts</span>()) : <span style="color: #003369;">the_post</span>();

                <span style="color: #dd0000;">?&gt;</span>

                ...</pre>
<p>The result:</p>
<div class="bigimage"><img class="aligncenter size-full wp-image-2596" title="Wordpress Theme Archive Page Display" src="http://aext.net/wp-contents/uploads/2010/01/Wordpress-Theme-Archive-Page-Display.png" alt="" width="500" height="271" /></div>
<h3>single.php</h3>
<hr />
<p>This file is used for display your WordPress posts. In this file, I will tell you a small trick. In HTML template, you see the post display as below:</p>
<pre class="html"><span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"summary"</span><span style="color: #881280;">&gt;</span>

    <span style="color: #881280;">&lt;p&gt;</span>Post Excerpt<span style="color: #881280;">&lt;/p&gt;</span>

<span style="color: #881280;">&lt;/div&gt;</span>

<span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"post-content"</span><span style="color: #881280;">&gt;</span>

    Post Main Content

<span style="color: #881280;">&lt;/div&gt;</span></pre>
<p>If you put <em>the_excerpt()</em> and <em>the_content()</em> together to display as above. That will not work because the post excerpt will be duplicated. Even when put the excerpt to the Excerpt field which located below the post editor. This is good if you want to display links or images in your excerpt, but it doesn&#8217;t work here.</p>
<p>Alright, here is the trick. We will hook into <em>the_content</em>. In functions.php file, add these code:</p>
<pre class="html"><span style="color: #003369;">add_filter</span>(<span style="color: #eb7300;">'the_content'</span>, <span style="color: #eb7300;">'format_content'</span>);

<span style="color: #881350;">function</span> <span style="color: #003369;">format_content</span>(<span style="color: #825900;">$content</span>) {

    <span style="color: #881350;">if</span>( <span style="color: #661aa9;">preg_match</span>(<span style="color: #eb7300;">'/&lt;span id="(.*?)?"&gt;&lt;\/span&gt;/'</span>, <span style="color: #825900;">$content</span>, <span style="color: #825900;">$matches</span>) ) {

        <span style="color: #825900;">$content</span> = <span style="color: #661aa9;">explode</span>(<span style="color: #825900;">$matches</span>[<span style="color: #0000ff;">0</span>], <span style="color: #825900;">$content</span>, <span style="color: #0000ff;">2</span>);

        <span style="color: #825900;">$content</span> = <span style="color: #eb7300;">'&lt;div class="summary"&gt;'</span> . <span style="color: #825900;">$content</span>[<span style="color: #0000ff;">0</span>] . <span style="color: #eb7300;">'&lt;/div&gt;'</span> . <span style="color: #825900;">$matches</span>[<span style="color: #0000ff;">0</span>] . <span style="color: #eb7300;">'&lt;div class="post-content"&gt;'</span> . <span style="color: #825900;">$content</span>[<span style="color: #0000ff;">1</span>] . <span style="color: #eb7300;">'&lt;/div&gt;'</span>;
    }

    <span style="color: #881350;">return</span> <span style="color: #825900;">$content</span>;

}</pre>
<p>We will split the content into 2 parts then wrap each part by specific div tag with class name &#8220;summary&#8221; and &#8220;post-content&#8221;. Is that cool?</p>
<p>And this is the complete code of single.php file:</p>
<pre class="html"><span style="color: #dd0000;">&lt;?php</span>

<em><span style="color: #236e25;">/**  * @package WordPress  * @subpackage FrozenFlirt_Theme  */</span></em>
<span style="color: #dd0000;">?&gt;</span>

<span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">get_header</span>(); <span style="color: #dd0000;">?&gt;</span>

            <span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"main-content"</span><span style="color: #881280;">&gt;</span>
              <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"container"</span><span style="color: #881280;">&gt;</span>

                <span style="color: #dd0000;">&lt;?php</span>

                <span style="color: #881350;">if</span>(<span style="color: #003369;">have_posts</span>()) : <span style="color: #881350;">while</span>(<span style="color: #003369;">have_posts</span>()) : <span style="color: #003369;">the_post</span>();

                <span style="color: #dd0000;">?&gt;</span>

                <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"post clearfix"</span><span style="color: #881280;">&gt;</span>
                    <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">the_permalink</span>() <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;">"</span><span style="color: #881280;">&gt;</span>
                    <span style="color: #dd0000;">&lt;?php</span>
                        <span style="color: #881350;">if</span>( <span style="color: #003369;">has_post_thumbnail</span>() ) {
                            <span style="color: #003369;">the_post_thumbnail</span>(<span style="color: #881350;">array</span>(<span style="color: #0000ff;">200</span>,<span style="color: #0000ff;">200</span>), <span style="color: #881350;">array</span>(<span style="color: #eb7300;">'class'</span> =&gt; <span style="color: #eb7300;">'thumbnail'</span>));
                        } <span style="color: #881350;">else</span> {
                            <em><span style="color: #236e25;">// Who doesn't want a thumbnail?? </span></em>                        }
                    <span style="color: #dd0000;">?&gt;</span>
                    <span style="color: #881280;">&lt;/a&gt;</span>

                    <span style="color: #881280;">&lt;h2&gt;&lt;a </span><span style="color: #994500;">rel</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"nofollow"</span><span style="color: #881280;">  </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">the_permalink</span>() <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;">"</span><span style="color: #881280;">&gt;</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">the_title</span>(); <span style="color: #dd0000;">?&gt;</span><span style="color: #881280;">&lt;/a&gt;&lt;/h2&gt;</span>                
                    <span style="color: #881280;">&lt;small&gt;</span>Written by <span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">the_author_posts_link</span>(); <span style="color: #dd0000;">?&gt;</span> on <span style="color: #881280;">&lt;strong&gt;</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">the_time</span>(<span style="color: #eb7300;">'F jS'</span>) <span style="color: #dd0000;">?&gt;</span><span style="color: #881280;">&lt;/strong&gt;</span> in <span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">the_category</span>(<span style="color: #eb7300;">', '</span>); <span style="color: #dd0000;">?&gt;</span><span style="color: #881280;">&lt;/small&gt;</span>

                    <span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">the_content</span>(); <span style="color: #dd0000;">?&gt;</span>

                <span style="color: #881280;">&lt;/div&gt;</span>

                <span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">comments_template</span>(); <span style="color: #dd0000;">?&gt;</span>

                <span style="color: #dd0000;">&lt;?php</span> <span style="color: #881350;">endwhile</span>; <span style="color: #dd0000;">?&gt;</span>

                <span style="color: #dd0000;">&lt;?php</span> <span style="color: #881350;">else</span>: <span style="color: #dd0000;">?&gt;</span>
                    <span style="color: #881280;">&lt;p&gt;</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">_e</span>(<span style="color: #eb7300;">"Sorry, no posts matched your criteria."</span>,<span style="color: #eb7300;">"arclite"</span>); <span style="color: #dd0000;">?&gt;</span><span style="color: #881280;">&lt;/p&gt;</span>
                <span style="color: #dd0000;">&lt;?php</span> <span style="color: #881350;">endif</span>; <span style="color: #dd0000;">?&gt;</span>

              <span style="color: #881280;">&lt;/div&gt;</span>
            <span style="color: #881280;">&lt;/div&gt;</span>

            <span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">get_sidebar</span>(); <span style="color: #dd0000;">?&gt;</span>

<span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">get_footer</span>(); <span style="color: #dd0000;">?&gt;</span></pre>
<p>You have done with the single.php file, but don&#8217;t forget to put <span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">comments_template</span>(); <span style="color: #dd0000;">?&gt;</span> before ending the loop.</p>
<div class="bigimage"><img class="aligncenter size-full wp-image-2600" title="Wordpress Theme split post content into 2 parts" src="http://aext.net/wp-contents/uploads/2010/01/Wordpress-Theme-split-post-content-into-2-parts-e1262938881543.png" alt="" width="500" height="253" /></div>
<h3>comments.php</h3>
<hr />
<p>WordPress fresh installed will come with the default theme and we can use some of those files to re-use. In default theme directory, open comments.php file, copy all the code then paste it to your new theme comments.php file. Use css to style the comment form and comments list. That&#8217;s all we need for the comment template.</p>
<p>I recommend some tutorial that help you build a better comment:</p>
<ul>
<li><a href="http://www.instantshift.com/2009/02/08/30-most-wanted-wordpress-comments-page-hacks/">30 Most Wanted WordPress Comments Page Hacks</a></li>
<li><a href="http://www.darrenhoyt.com/2007/08/18/styling-your-wordpress-comments/">Styling Your WordPress Comments</a></li>
<li><a href="http://www.smashingmagazine.com/2009/07/23/10-wordpress-comments-hacks/">10 Handy WordPress Comments Hacks</a></li>
</ul>
<p>The most important when editing the comments.php file is DON&#8217;T FORGET to put these code before closing the comment form tag:</p>
<pre class="html"><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">comment_id_fields</span>(); <span style="color: #dd0000;">?&gt;</span>
<span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">do_action</span>(<span style="color: #eb7300;">'comment_form'</span>, <span style="color: #825900;">$post</span>-&gt;ID); <span style="color: #dd0000;">?&gt;</span></pre>
<p>With <em>page.php</em> file to display pages, we are good to use the same code of <em>single.php</em> file because the in fact, page is a post.</p>
<h3>Conclusion</h3>
<p>This tutorial doesn&#8217;t guide you to build a completed WordPress theme, but at least it makes the WordPress Theme FrozenFlirt works with some basic function such as: view post, view index page, archive pages, comments&#8230;. If you need to build a completed theme with all of function you will need do more. The great place and my recommend website to learn how to mastering WordPress theme is <a href="http://codex.wordpress.org/Main_Page">WordPress Codex</a>. Hope you guys design great WordPress theme from this tutorial. Any suggestion helps this tutorial more completed will be appreciated.</p>
]]></content:encoded>
			<wfw:commentRss>http://aext.net/2010/01/wordpress-theme-from-scratch-day-3-html-to-wordpress/feed/</wfw:commentRss>
		<slash:comments>47</slash:comments>
		</item>
		<item>
		<title>The Nice Way To Mention Your Recent Articles in WordPress SideBar</title>
		<link>http://aext.net/2009/12/the-nice-way-to-mention-your-recent-articles-in-wordpress-sidebar/</link>
		<comments>http://aext.net/2009/12/the-nice-way-to-mention-your-recent-articles-in-wordpress-sidebar/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 20:53:42 +0000</pubDate>
		<dc:creator>Lief</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Theme Design]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Wordpress Plugin]]></category>
		<category><![CDATA[Wordpress Sidebar]]></category>
		<category><![CDATA[Wordpress Theme]]></category>

		<guid isPermaLink="false">http://aext.net/?p=2301</guid>
		<description><![CDATA[<p><a href="http://aext.net/theme/platinoom" title="Platinoom - Premium WordPress Themes"><img src="http://aext.net/wp-content/uploads/2011/04/platinoom_wordpress_theme.png" alt="ThemeKiss" /></a></p><p style="float: right;"><a href="http://api.tweetmeme.com/share?url=http://aext.net/2009/12/the-nice-way-to-mention-your-recent-articles-in-wordpress-sidebar/&service=su.pr&service_api=b57727e991c454bd2b2c62ff71462c79"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://aext.net/2009/12/the-nice-way-to-mention-your-recent-articles-in-wordpress-sidebar/" height="61" width="51" /></a></p>People asked me how I mention my recent articles in WordPress sidebar by display post thumbnails and titles with a well-styled. Today, I would like to response their request. This way is being used in some blogs. I'm not sure if they are using the same method as mine, but at least we will get the same result. <a href="http://aext.net/2009/12/the-nice-way-to-mention-your-recent-articles-in-wordpress-sidebar/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://aext.net/theme/platinoom" title="Platinoom - Premium WordPress Themes"><img src="http://aext.net/wp-content/uploads/2011/04/platinoom_wordpress_theme.png" alt="ThemeKiss" /></a></p><p style="float: right;"><a href="http://api.tweetmeme.com/share?url=http://aext.net/2009/12/the-nice-way-to-mention-your-recent-articles-in-wordpress-sidebar/&service=su.pr&service_api=b57727e991c454bd2b2c62ff71462c79"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://aext.net/2009/12/the-nice-way-to-mention-your-recent-articles-in-wordpress-sidebar/" height="61" width="51" /></a></p><p>People asked me how I mention my recent articles in WordPress sidebar by display post thumbnails and titles with a well-styled. Today, I would like to response their request. This way is being used in some blogs. I&#8217;m not sure if they are using the same method as mine, but at least we will get the same result.</p>
<p><span id="more-2301"></span></p>
<p>When design blog theme in WordPress, I always look for non-using plugins solution. People asked me which plugin I&#8217;m using for this sidebar. No, the answer is NO.</p>
<p>There are a lot of WordPress plugins to display your recent articles, popular articles to mention your posts in the sidebar widget. However, you forgot that you can do the same with a simple posts query using <em><a href="http://codex.wordpress.org/Function_Reference/WP_Query">WP_Query();</a></em> function.</p>
<p>To begin, create new posts object that you will call by will <strong>have_posts()</strong> and display your posts within the loop</p>
<p>Example:</p>
<pre>$wp_query-&gt;have_posts();</pre>
<p>This function is called to see if there are any posts to show. Using the while loop, and we can use have_post() as the condition. This will iterate around as long as there are posts to show.</p>
<p>In my case, I&#8217;m using iterations, the_post(), within the while loop to iterate around as long as there are posts to show.</p>
<pre class="php"><span style="color: #881280;">&lt;ul&gt;</span>

  <span style="color: #dd0000;">&lt;?php</span> <span style="color: #825900;">$recent</span> = <span style="color: #881350;">new</span> <span style="color: #003369;">WP_Query</span>(<span style="color: #eb7300;">"showposts=35"</span>); <span style="color: #881350;">while</span>(<span style="color: #825900;">$recent</span>-&gt;<span style="color: #003369;">have_posts</span>()) : <span style="color: #825900;">$recent</span>-&gt;<span style="color: #003369;">the_post</span>();<span style="color: #dd0000;">?&gt;</span>

    <span style="color: #881280;">&lt;li&gt;</span>
      <span style="color: #881280;">&lt;a </span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Permanent Link to </span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">the_title</span>(); <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;">"</span><span style="color: #994500;">rel</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"nofollow"</span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">the_permalink</span>() <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;">"</span><span style="color: #881280;">&gt;</span>

        <span style="color: #dd0000;">&lt;?php</span> <span style="color: #881350;">if</span>(<span style="color: #003369;">get_post_meta</span>(<span style="color: #825900;">$post</span>-&gt;ID, <span style="color: #eb7300;">"image"</span>, <span style="color: #881350;">true</span>)): <span style="color: #dd0000;">?&gt;</span>
            <span style="color: #881280;">&lt;img </span><span style="color: #994500;">src</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">bloginfo</span>(<span style="color: #eb7300;">'template_url'</span>); <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;">/scripts/thumb.php?src=</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #881350;">echo</span> <span style="color: #003369;">get_post_meta</span>(<span style="color: #825900;">$post</span>-&gt;ID, <span style="color: #eb7300;">"image"</span>, <span style="color: #881350;">true</span>); <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;">&amp;w=25&amp;h=25&amp;zc=1"</span><span style="color: #994500;">alt</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">the_title</span>(); <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;">"</span><span style="color: #881280;"> /&gt;</span>
        <span style="color: #dd0000;">&lt;?php</span> <span style="color: #881350;">else</span>: <span style="color: #dd0000;">?&gt;</span>
            <span style="color: #881280;">&lt;img </span><span style="color: #994500;">src</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">bloginfo</span>(<span style="color: #eb7300;">'template_url'</span>); <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;">/images/thumbnail.png"</span><span style="color: #994500;">width</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"25"</span><span style="color: #994500;">height</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"25"</span><span style="color: #994500;">alt</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">the_title</span>(); <span style="color: #dd0000;">?&gt;</span><span style="color: #1a1aa6;">"</span><span style="color: #881280;"> /&gt;</span>    
        <span style="color: #dd0000;">&lt;?php</span> <span style="color: #881350;">endif</span>; <span style="color: #dd0000;">?&gt;</span>

      <span style="color: #881280;">&lt;span&gt;</span><span style="color: #dd0000;">&lt;?php</span> <span style="color: #003369;">the_title</span>(); <span style="color: #dd0000;">?&gt;</span><span style="color: #881280;">&lt;/span&gt;&lt;/a&gt;</span>
    <span style="color: #881280;">&lt;/li&gt;</span>

  <span style="color: #dd0000;">&lt;?php</span> <span style="color: #881350;">endwhile</span>; <span style="color: #dd0000;">?&gt;</span>

<span style="color: #881280;">&lt;/ul&gt;</span></pre>
<p>This code above will check if you have post meta name is <strong>image</strong>, it will display the thumbnail using <a href="http://code.google.com/p/timthumb/">timthumb</a> script. Timthumb is a small php script for cropping, zooming and resizing web images (jpg, png, gif). Perfect for use on blogs and other applications.</p>
<p>[smartads]</p>
<p>You can change the number of post will be displayed and set the condition to display number of posts in single page larger than other page because the post page is always longer than others, right?</p>
<p>CSS Bonus:</p>
<pre class="css">.widget ul {
    <span style="color: #88134f;">list-style-type</span>:<span style="color: #9b4400;">none</span>;
    <span style="color: #88134f;">margin</span>:<span style="color: #0000ff;">5px</span> <span style="color: #9b4400;">auto</span> <span style="color: #0000ff;">8px</span>;
    <span style="color: #88134f;">padding</span>:<span style="color: #0000ff;">0 0 2px</span>;
    <span style="color: #88134f;">width</span>:<span style="color: #9b4400;">auto</span>;
}

.widget ul li {
    <span style="color: #88134f;">clear</span>:<span style="color: #9b4400;">both</span>;
    <span style="color: #88134f;">letter-spacing</span>:<span style="color: #0000ff;">0</span>;
    <span style="color: #88134f;">margin</span>:<span style="color: #0000ff;">0</span>;
    <span style="color: #88134f;">padding</span>:<span style="color: #0000ff;">5px</span> <span style="color: #0000ff;">0 0</span>;
}

.widget ul li a {
    <span style="color: #88134f;">border-bottom</span>:<span style="color: #0000ff;">0 </span><span style="color: #9b4400;">dotted</span> <span style="color: #760f15;">#DDDDDD</span>;
    <span style="color: #88134f;">color</span>:<span style="color: #760f15;">#333333</span>;
    <span style="color: #88134f;">font-family</span>:Georgia,<span style="color: #760f15;">"Nimbus Roman No9 L"</span>,<span style="color: #9b4400;">serif</span>;
    <span style="color: #88134f;">font-size</span>:<span style="color: #0000ff;">11px</span>;
    <span style="color: #88134f;">font-weight</span>:<span style="color: #9b4400;">normal</span>;
    <span style="color: #88134f;">margin</span>:<span style="color: #0000ff;">0</span>;
    <span style="color: #88134f;">padding</span>:<span style="color: #0000ff;">0</span>;
    <span style="color: #88134f;">text-decoration</span>:<span style="color: #9b4400;">none</span>;
}

.widget ul li img {
    <span style="color: #88134f;">border</span>:<span style="color: #0000ff;">3px</span> <span style="color: #9b4400;">solid</span> <span style="color: #760f15;">#DFDFDF</span>;
    <span style="color: #88134f;">float</span>:<span style="color: #9b4400;">left</span>;
    <span style="color: #88134f;">margin-bottom</span>:<span style="color: #0000ff;">10px</span>;
    <span style="color: #88134f;">margin-right</span>:<span style="color: #0000ff;">10px</span>;
    <span style="color: #88134f;">padding</span>:<span style="color: #0000ff;">1px</span>;
}

.widget ul li span {
    <span style="color: #88134f;">display</span>:<span style="color: #9b4400;">block</span>;
    <span style="color: #88134f;">padding</span>:<span style="color: #0000ff;">0</span>;
}</pre>
<h3>Conclusion</h3>
<hr />
<p>We don&#8217;t need to use any plugin for display not only such a simple list of post like that but also other simple things in WordPress. WordPress provide us <a href="http://codex.wordpress.org/">WordPress Codex</a>which contains a thousand of Function References. If you want to build your own WordPress theme with unique style, the first thing you need is check out how WordPress function works. Good luck, hope see more beautiful WordPress themes from the web community.</p>
]]></content:encoded>
			<wfw:commentRss>http://aext.net/2009/12/the-nice-way-to-mention-your-recent-articles-in-wordpress-sidebar/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
		</item>
		<item>
		<title>WordPress Theme from Scratch- Day 2: PSD to HTML</title>
		<link>http://aext.net/2009/12/wordpress-theme-from-scratch-%e2%80%93-day-2-psd-to-html/</link>
		<comments>http://aext.net/2009/12/wordpress-theme-from-scratch-%e2%80%93-day-2-psd-to-html/#comments</comments>
		<pubDate>Sat, 26 Dec 2009 08:42:59 +0000</pubDate>
		<dc:creator>Lief</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[from scratch]]></category>
		<category><![CDATA[PSD2HTML]]></category>
		<category><![CDATA[Wordpress Theme]]></category>

		<guid isPermaLink="false">http://aext.net/?p=2222</guid>
		<description><![CDATA[<p><a href="http://aext.net/theme/platinoom" title="Platinoom - Premium WordPress Themes"><img src="http://aext.net/wp-content/uploads/2011/04/platinoom_wordpress_theme.png" alt="ThemeKiss" /></a></p><p style="float: right;"><a href="http://api.tweetmeme.com/share?url=http://aext.net/2009/12/wordpress-theme-from-scratch-%e2%80%93-day-2-psd-to-html/&service=su.pr&service_api=b57727e991c454bd2b2c62ff71462c79"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://aext.net/2009/12/wordpress-theme-from-scratch-%e2%80%93-day-2-psd-to-html/" height="61" width="51" /></a></p>This tutorial is in the series of "WordPress Theme from Scratch" that help you build a WordPress theme by yourself from nothing. We already learned how to create a mock up for WordPress theme in Photoshop last week. Today, we will continue to make HTML file from that psd layout. <a href="http://aext.net/2009/12/wordpress-theme-from-scratch-%e2%80%93-day-2-psd-to-html/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://aext.net/theme/platinoom" title="Platinoom - Premium WordPress Themes"><img src="http://aext.net/wp-content/uploads/2011/04/platinoom_wordpress_theme.png" alt="ThemeKiss" /></a></p><p style="float: right;"><a href="http://api.tweetmeme.com/share?url=http://aext.net/2009/12/wordpress-theme-from-scratch-%e2%80%93-day-2-psd-to-html/&service=su.pr&service_api=b57727e991c454bd2b2c62ff71462c79"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://aext.net/2009/12/wordpress-theme-from-scratch-%e2%80%93-day-2-psd-to-html/" height="61" width="51" /></a></p><p>This tutorial is in the series of <strong>&#8220;WordPress Theme from Scratch&#8221;</strong> that help you build a WordPress theme by yourself from nothing. We already learned how to create a mock up for WordPress theme in Photoshop last week. Today, we will continue to make HTML file from that psd layout.</p>
<p><span id="more-2222"></span></p>
<div class="demo-download">
<ul>
<li><a class="demoit" href="http://aext.net/wordpress-theme-tutorial/frozenflirt/">Demo</a></li>
</ul>
</div>
<p><strong>If You want to stay updated and get news regularly consider subscribing to <a href="http://feeds.feedburner.com/prlamnguyen">AEXT.NET</a> feed and following on <a href="http://twitter.com/prlamnguyen">Twitter</a>.</strong></p>
<p>Have you check the previous post in this series? If you haven&#8217;t, I would like to forward you a link to a PSD tutorial right here: <a href="http://aext.net/2009/12/wordpress-theme-from-scratch-day-1-psd/">WordPress Theme from Scratch â€“ Day 1: PSD</a>. After showing that post, please download it then open it via Photoshop and we can begin the tutorial for HTML from it.</p>
<p>From the mock up that you have just downloaded, we will create one more layout for the post page in HTML that you can see at the end of this post.</p>
<h3>Get ready</h3>
<hr />
<p>Honestly, I love to create a basic HTML in Dreamweaver first then edit it in Coda or any text editor. However, I would use Coda for the whole tutorial to help you know clearly how our layout comes from scratch.</p>
<p>To begin, we will create a files structure for our project. To help us easy to control our file, the easiest way for structure is something like below:</p>
<pre>-- FrozenFlirt
----- index.html
----- style.css
----- images</pre>
<p>Your layout in HTML should be:</p>
<div class="bigimage"><img class="aligncenter size-full wp-image-2225" title="HTML - structure" src="http://aext.net/wp-contents/uploads/2009/12/HTML-structure-e1261429216430.png" alt="" width="500" height="609" /></div>
<p>We are going to work with the first mock up which is your blog home page. At first, there are some information about this template that you should know.</p>
<ul>
<li>Our template will be centered.</li>
<li>Because we are going to create a design that works for screen solution from 1024&#215;768, the width should be 910px and we need some extra margin 20px in the left and right side.</li>
<li>I&#8217;m not sure if it supports for all major web browsers, but I will try my best</li>
</ul>
<h3>Prepare the HTML file</h3>
<hr />
<p>From the root folder of our project, create index.html file that contains this basic code:</p>
<pre class="html"><em><span style="color: #236e25;">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;</span></em>
<span style="color: #881280;">&lt;html </span><span style="color: #994500;">xmlns</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"http://www.w3.org/1999/xhtml"</span><span style="color: #881280;">&gt;</span>
<span style="color: #881280;">&lt;head&gt;</span>
Â Â Â Â <span style="color: #881280;">&lt;meta </span><span style="color: #994500;">http-equiv</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Content-Type"</span><span style="color: #994500;">content</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"text/html; charset=UTF-8"</span><span style="color: #881280;"> /&gt;</span>
Â Â Â Â <span style="color: #881280;">&lt;title&gt;</span>FrozenFlirt WordPress Theme From Scratch<span style="color: #881280;">&lt;/title&gt;</span>
Â Â Â Â <span style="color: #881280;">&lt;link </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"style.css"</span><span style="color: #994500;">rel</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"stylesheet"</span><span style="color: #994500;">type</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"text/css"</span><span style="color: #881280;"> /&gt;</span>

<span style="color: #881280;">&lt;/head&gt;</span>

<span style="color: #881280;">&lt;body&gt;</span>

Â Â Â Â <span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"main-wrapper"</span><span style="color: #881280;">&gt;</span>

Â Â Â Â Â Â Â Â <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"container"</span><span style="color: #881280;">&gt;</span>

Â Â Â Â Â Â Â Â Â Â Â Â <span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"header"</span><span style="color: #881280;">&gt;</span>

Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â <span style="color: #881280;">&lt;ul </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"topmenu"</span><span style="color: #881280;">&gt;</span>
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Menu items
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â <span style="color: #881280;">&lt;/ul&gt;</span>

Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â <span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"topsearch"</span><span style="color: #881280;">&gt;</span>
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Search Panel
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â <span style="color: #881280;">&lt;/div&gt;</span>

Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â <span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"logo"</span><span style="color: #881280;">&gt;</span>
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Logo
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â <span style="color: #881280;">&lt;/div&gt;</span>

Â Â Â Â Â Â Â Â Â Â Â Â <span style="color: #881280;">&lt;/div&gt;</span>

Â Â Â Â Â Â Â Â Â Â Â Â <span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"main-content"</span><span style="color: #881280;">&gt;</span>

Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Your content goes here

Â Â Â Â Â Â Â Â Â Â Â Â <span style="color: #881280;">&lt;/div&gt;</span>

Â Â Â Â Â Â Â Â Â Â Â Â <span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"sidebar"</span><span style="color: #881280;">&gt;</span>

Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Sidebar content goes here

Â Â Â Â Â Â Â Â Â Â Â Â <span style="color: #881280;">&lt;/div&gt;</span>

Â Â Â Â Â Â Â Â Â Â Â Â <span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"flickr-stream"</span><span style="color: #881280;">&gt;</span>

Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Flickr Stream

Â Â Â Â Â Â Â Â Â Â Â Â <span style="color: #881280;">&lt;/div&gt;</span> Â Â Â Â Â 

Â Â Â Â Â Â Â Â Â Â Â Â <span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"twitter-update"</span><span style="color: #881280;">&gt;</span>

Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Twitter

Â Â Â Â Â Â Â Â Â Â Â Â <span style="color: #881280;">&lt;/div&gt;</span> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 

Â Â Â Â Â Â Â Â <span style="color: #881280;">&lt;/div&gt;</span>

Â Â Â Â <span style="color: #881280;">&lt;/div&gt;</span>

Â Â Â Â <span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"footer-wrapper"</span><span style="color: #881280;">&gt;</span>

Â Â Â Â Â Â Â Â <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"container"</span><span style="color: #881280;">&gt;</span>

Â Â Â Â Â Â Â Â Â Â Â Â Footer content goes here

Â Â Â Â Â Â Â Â <span style="color: #881280;">&lt;/div&gt;</span>

Â Â Â Â <span style="color: #881280;">&lt;/div&gt;</span>

<span style="color: #881280;">&lt;/body&gt;</span>
<span style="color: #881280;">&lt;/html&gt;</span></pre>
<p>All of <strong>DIV</strong> element inside the segments (&#8230;-wrapper) will be fixed in width. However, before we go to CSS part, let reset our layout style first. Download the css reset right <a href="http://meyerweb.com/eric/tools/css/reset/">here</a> and include it in our HTML file:</p>
<pre class="html"><span style="color: #881280;">&lt;head&gt;</span>
Â Â Â Â <span style="color: #881280;">&lt;meta </span><span style="color: #994500;">http-equiv</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Content-Type"</span><span style="color: #994500;">content</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"text/html; charset=UTF-8"</span><span style="color: #881280;"> /&gt;</span>
Â Â Â Â <span style="color: #881280;">&lt;title&gt;</span>FrozenFlirt WordPress Theme From Scratch<span style="color: #881280;">&lt;/title&gt;</span>
Â Â Â Â <span style="color: #881280;">&lt;link </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"reset.css"</span><span style="color: #994500;">rel</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"stylesheet"</span><span style="color: #994500;">type</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"text/css"</span><span style="color: #881280;"> /&gt;</span>
Â Â Â Â <span style="color: #881280;">&lt;link </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"style.css"</span><span style="color: #994500;">rel</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"stylesheet"</span><span style="color: #994500;">type</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"text/css"</span><span style="color: #881280;"> /&gt;</span>

<span style="color: #881280;">&lt;/head&gt;</span></pre>
<p>We try to add some CSS code for the segments and the body, by the way, center the DIV with class name container:</p>
<pre class="css">body {
Â Â Â Â <span style="color: #88134f;">font</span>: <span style="color: #0000ff;">14px</span>/<span style="color: #0000ff;">21px</span> Helvetica, Arial, <span style="color: #9b4400;">sans-serif</span>;
Â Â Â Â <span style="color: #88134f;">font-weight</span>: <span style="color: #9b4400;">normal</span>;
Â Â Â Â <span style="color: #88134f;">color</span>: <span style="color: #760f15;">#333333</span>;
Â Â Â Â <span style="color: #88134f;">background-color</span>:<span style="color: #760f15;">#cacaca</span>;
}

#main-wrapper {

}

#footer-wrapper {

}

.container {
Â Â Â Â <span style="color: #88134f;">width</span>:<span style="color: #0000ff;">950px</span>;
Â Â Â Â <span style="color: #88134f;">margin</span>:<span style="color: #0000ff;">0 </span><span style="color: #9b4400;">auto</span>;
}</pre>
<p>Now, look at our page after reset css style and add some css code</p>
<div class="bigimage"><img class="aligncenter size-full wp-image-2236" title="After reset CSS" src="http://aext.net/wp-contents/uploads/2009/12/After-reset-CSS-e1261442634181.png" alt="" width="500" height="210" /></div>
<h3>Adding Background</h3>
<hr />
<p>And now, it&#8217;s time for us to add some backgrounds for our layout. First, we will add the main background. Because our background goes with noise effect, we cannot slide the image as small as 1px or 2px you usually did with solid background. Come back to our psd file and slide a background for it.</p>
<p>To slide out an image for background, you have to deselect the eye icon in the layers panel, that means you make other layers invisible except the background. Select an square by using <strong>Rectangular Marquee Tool</strong> with the size about 200px x 200px or larger like this:</p>
<div class="bigimage"><a href="http://aext.net/wp-contents/uploads/2009/12/Photoshop-Crop-background-with-square.png"><img class="aligncenter size-full wp-image-2237" title="Photoshop - Crop background with square" src="http://aext.net/wp-contents/uploads/2009/12/Photoshop-Crop-background-with-square.png" alt="" width="500" /></a></div>
<p>We do the same as above for the header-wrapper, and this is how I did:</p>
<div class="bigimage"><a href="http://aext.net/wp-contents/uploads/2009/12/Photoshop-Crop-header-background.png"><img class="aligncenter size-full wp-image-2239" title="Photoshop - Crop header background" src="http://aext.net/wp-contents/uploads/2009/12/Photoshop-Crop-header-background.png" alt="" width="500" /></a></div>
<p>Referring to the layout that we made in Photoshop, we have a little light on top to make the background more attractive. Ok, show up your Guides by using <strong>CTRL + ;</strong> (Command + ; on Mac) and crop your main header background:</p>
<div class="bigimage"><a href="http://aext.net/wp-contents/uploads/2009/12/Photoshop-Crop-main-header-background-with-light.png"><img class="aligncenter size-full wp-image-2241" title="Photoshop - Crop main header background with light" src="http://aext.net/wp-contents/uploads/2009/12/Photoshop-Crop-main-header-background-with-light.png" alt="" width="500" /></a></div>
<p>Change something in your css code to add background:</p>
<pre class="css">body {
    <span style="color: #88134f;">font</span>: <span style="color: #0000ff;">14px</span>/<span style="color: #0000ff;">21px</span> Helvetica, Arial, <span style="color: #9b4400;">sans-serif</span>;
    <span style="color: #88134f;">font-weight</span>: <span style="color: #9b4400;">normal</span>;
    <span style="color: #88134f;">color</span>: <span style="color: #760f15;">#333333</span>;
    <span style="color: #88134f;">background</span>:<span style="color: #760f15;">#cacaca</span> <span style="color: #9b4400;">url</span><span style="color: #760f15;">(images/bg.png)</span>;
}

#main-wrapper {
    <span style="color: #88134f;">background</span>: <span style="color: #9b4400;">url</span><span style="color: #760f15;">(images/topmenu-bg.png)</span> <span style="color: #9b4400;">repeat-x</span>;

}

#footer-wrapper {

}

.container {
    <span style="color: #88134f;">width</span>:<span style="color: #0000ff;">910px</span>;
    <span style="color: #88134f;">padding</span>: <span style="color: #0000ff;">0 20px</span>;
    <span style="color: #88134f;">margin</span>:<span style="color: #0000ff;">0 </span><span style="color: #9b4400;">auto</span>;
}

#main-wrapper .container {
    <span style="color: #88134f;">background</span>: <span style="color: #9b4400;">url</span><span style="color: #760f15;">(images/mainheader-bg.png)</span> <span style="color: #9b4400;">no-repeat</span>;

}</pre>
<p>Also add some text to your main content to make our current draft layout higher, and here is what we got:</p>
<div class="bigimage"><a href="http://aext.net/wp-contents/uploads/2009/12/Photoshop-Background-completed.png"><img class="aligncenter size-full wp-image-2243" title="Photoshop - Background completed" src="http://aext.net/wp-contents/uploads/2009/12/Photoshop-Background-completed.png" alt="" width="500" /></a></div>
<h3>Header</h3>
<hr />
<p>We are going to add some items to our header menu first, then create a search panel with awesome transparent effect. Prepare the menu with some items by using un-order list:</p>
<pre class="html">                <span style="color: #881280;">&lt;ul </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"topmenu"</span><span style="color: #881280;">&gt;</span>
                    <span style="color: #881280;">&lt;li&gt;</span>
                        <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Home Page"</span><span style="color: #881280;">&gt;&lt;span&gt;</span>Home<span style="color: #881280;">&lt;/span&gt;&lt;/a&gt;</span>
                    <span style="color: #881280;">&lt;/li&gt;</span>
                    <span style="color: #881280;">&lt;li&gt;</span>
                        <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Tutorial Category"</span><span style="color: #881280;">&gt;&lt;span&gt;</span>Tutorial<span style="color: #881280;">&lt;/span&gt;&lt;/a&gt;</span>
                    <span style="color: #881280;">&lt;/li&gt;</span>
                    <span style="color: #881280;">&lt;li&gt;</span>
                        <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Freebie Category"</span><span style="color: #881280;">&gt;&lt;span&gt;</span>Freebie<span style="color: #881280;">&lt;/span&gt;&lt;/a&gt;</span>
                    <span style="color: #881280;">&lt;/li&gt;</span>
                    <span style="color: #881280;">&lt;li&gt;</span>
                        <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Inspiration Category"</span><span style="color: #881280;">&gt;&lt;span&gt;</span>Inspiration<span style="color: #881280;">&lt;/span&gt;&lt;/a&gt;</span>
                    <span style="color: #881280;">&lt;/li&gt;</span>
                    <span style="color: #881280;">&lt;li&gt;</span>
                        <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Resources Category"</span><span style="color: #881280;">&gt;&lt;span&gt;</span>Resources<span style="color: #881280;">&lt;/span&gt;&lt;/a&gt;</span>
                    <span style="color: #881280;">&lt;/li&gt;</span>
                <span style="color: #881280;">&lt;/ul&gt;</span></pre>
<p>This screenshot is captured before using css:</p>
<div class="bigimage"><a href="http://aext.net/wp-contents/uploads/2009/12/Photoshop-Adding-header-menu-without-css.png"><img class="aligncenter size-full wp-image-2245" title="Photoshop - Adding header menu without css" src="http://aext.net/wp-contents/uploads/2009/12/Photoshop-Adding-header-menu-without-css.png" alt="" width="500" /></a></div>
<p>Add these CSS code to style our header menu:</p>
<pre class="css">#header {
    <span style="color: #88134f;">padding-top</span>: <span style="color: #0000ff;">10px</span>;
}

#header ul#topmenu {
    <span style="color: #88134f;">margin-top</span>: <span style="color: #0000ff;">5px</span>;
}

#header ul#topmenu li {
    <span style="color: #88134f;">display</span>: <span style="color: #9b4400;">inline</span>;
    <span style="color: #88134f;">line-height</span>: <span style="color: #0000ff;">28px</span>;
    <span style="color: #88134f;">margin-right</span>: <span style="color: #0000ff;">15px</span>;
}

#header ul#topmenu li a {
    <span style="color: #88134f;">color</span>: <span style="color: #760f15;">#6f6f6f</span>;
    <span style="color: #88134f;">font-size</span>: <span style="color: #0000ff;">10px</span>;
    <span style="color: #88134f;">font-weight</span>: <span style="color: #9b4400;">bold</span>;
    <span style="color: #88134f;">text-transform</span>: <span style="color: #9b4400;">uppercase</span>;
    <span style="color: #88134f;">text-decoration</span>: <span style="color: #9b4400;">none</span>;
}

#header ul#topmenu li a:hover {
    <span style="color: #88134f;">color</span>: <span style="color: #760f15;">#000000</span>;
}</pre>
<p>If you are using the psd file downloaded from previous post, you will understand why we have some margin and padding space here by show Guides in Photoshop.</p>
<p>I wrap menu item by a span tag because I want to make a rounded border for menu items when mouse is over. I will use 2 images for each menu, and this is the best way to cross browsers for rounded corners.</p>
<p>In Photoshop, crop the rounded border image into 2 images. By the way, we also need a background for search panel. Create new PNG file with some images inside for css sprites.</p>
<div style="text-align: center;"><img class="aligncenter size-full wp-image-2293" title="Photoshop - menu sprite" src="http://aext.net/wp-contents/uploads/2009/12/Photoshop-menu-sprite.png" alt="" width="286" height="512" /></div>
<p>And now, make our menu more beautiful:</p>
<pre class="css"><em><span style="color: #236e25;">/*------ TOP MENU ------ */</span></em>

#header ul#topmenu {
    <span style="color: #88134f;">margin-top</span>: <span style="color: #0000ff;">5px</span>;
}

#header ul#topmenu li {
    <span style="color: #88134f;">display</span>: <span style="color: #9b4400;">inline</span>;
    <span style="color: #88134f;">float</span>: <span style="color: #9b4400;">left</span>;
    <span style="color: #88134f;">margin-right</span>: <span style="color: #0000ff;">10px</span>;
}

#header ul#topmenu li a {
    <span style="color: #88134f;">display</span>: <span style="color: #9b4400;">block</span>;
    <span style="color: #88134f;">color</span>: <span style="color: #760f15;">#6f6f6f</span>;
    <span style="color: #88134f;">font-size</span>: <span style="color: #0000ff;">10px</span>;
    <span style="color: #88134f;">font-weight</span>: <span style="color: #9b4400;">bold</span>;
    <span style="color: #88134f;">text-transform</span>: <span style="color: #9b4400;">uppercase</span>;
    <span style="color: #88134f;">text-decoration</span>: <span style="color: #9b4400;">none</span>;
    <span style="color: #88134f;">padding</span>:<span style="color: #0000ff;">0 6px</span> <span style="color: #0000ff;">0 0</span>;
}

#header ul#topmenu li a:hover {
    <span style="color: #88134f;">color</span>: <span style="color: #760f15;">#000000</span>;
    <span style="color: #88134f;">background</span>:<span style="color: #9b4400;">transparent</span> <span style="color: #9b4400;">url</span><span style="color: #760f15;">(images/sprites.png)</span> <span style="color: #9b4400;">no-repeat</span> <span style="color: #9b4400;">right</span> -<span style="color: #0000ff;">34px</span>;
}

#header ul#topmenu li a span {
    <span style="color: #88134f;">display</span>: <span style="color: #9b4400;">block</span>;
    <span style="color: #88134f;">line-height</span>: <span style="color: #0000ff;">28px</span>;
    <span style="color: #88134f;">padding</span>:<span style="color: #0000ff;">0px</span> <span style="color: #0000ff;">0px</span> <span style="color: #0000ff;">0px</span> <span style="color: #0000ff;">6px</span>;
}

#header ul#topmenu li a:hover span {
    <span style="color: #88134f;">background</span>:<span style="color: #9b4400;">transparent</span> <span style="color: #9b4400;">url</span><span style="color: #760f15;">(images/sprites.png)</span> <span style="color: #9b4400;">no-repeat</span> <span style="color: #9b4400;">left</span> -<span style="color: #0000ff;">2px</span>;
}</pre>
<p>For the search panel, insert these HTML code into your html file:</p>
<pre class="html"><span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"topsearch"</span><span style="color: #881280;">&gt;</span>
  <span style="color: #881280;">&lt;form </span><span style="color: #994500;">action</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"http://aext.net/"</span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"searchform"</span><span style="color: #994500;">method</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"get"</span><span style="color: #881280;">&gt;</span>
    <span style="color: #881280;">&lt;fieldset&gt;</span>
        <span style="color: #881280;">&lt;input </span><span style="color: #994500;">type</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"text"</span><span style="color: #881280;">                 </span><span style="color: #994500;">onblur</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"if (this.value == '') {this.value = 'Type Keywords And Hit Enter...';}"</span><span style="color: #881280;">                 </span><span style="color: #994500;">onfocus</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"if(this.value == 'Type Keywords And Hit Enter...') {this.value = '';}"</span><span style="color: #881280;">                 </span><span style="color: #994500;">value</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Type Keywords And Hit Enter..."</span><span style="color: #881280;">                 </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"searchfield"</span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"searchbox"</span><span style="color: #994500;">name</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"s"</span><span style="color: #881280;">/&gt;</span>
    <span style="color: #881280;">&lt;/fieldset&gt;</span>
  <span style="color: #881280;">&lt;/form&gt;</span>
<span style="color: #881280;">&lt;/div&gt;</span></pre>
<p>And CSS for it:</p>
<pre class="css"><em><span style="color: #236e25;">/*------ TOP SEARCH ------ */</span></em>

#header #topsearch {
    <span style="color: #88134f;">float</span>: <span style="color: #9b4400;">right</span>;
}

#header #topsearch fieldset {
    <span style="color: #88134f;">height</span>: <span style="color: #0000ff;">28px</span>;
    <span style="color: #88134f;">width</span>: <span style="color: #0000ff;">247px</span>;
    <span style="color: #88134f;">background</span>:<span style="color: #9b4400;">transparent</span> <span style="color: #9b4400;">url</span><span style="color: #760f15;">(images/sprites.png)</span> <span style="color: #9b4400;">no-repeat</span> <span style="color: #9b4400;">left</span> -<span style="color: #0000ff;">69px</span>;
}

#header #topsearch fieldset .searchfield {
    <span style="color: #88134f;">background-color</span>: <span style="color: #9b4400;">transparent</span>;
    -x-system-<span style="color: #88134f;">font</span>:<span style="color: #9b4400;">none</span>;
    <span style="color: #88134f;">text-transform</span>: <span style="color: #9b4400;">uppercase</span>;
    <span style="color: #88134f;">border</span>: <span style="color: #9b4400;">none</span>;
    <span style="color: #88134f;">color</span>:<span style="color: #760f15;">#6f6f6f</span>;
    <span style="color: #88134f;">font-family</span>:Arial,Helvetica,<span style="color: #9b4400;">sans-serif</span>;
    <span style="color: #88134f;">margin</span>: <span style="color: #0000ff;">3px</span> <span style="color: #0000ff;">0 0 3px</span>;
    <span style="color: #88134f;">padding</span>:<span style="color: #0000ff;">5px</span>;
    <span style="color: #88134f;">width</span>:<span style="color: #0000ff;">200px</span>;
}</pre>
<p>When you are styling the searchfiled, you may get problem with placing the textfiled perfectly with the background behind it. That will be easy if you set border for your TextField first, then you can see clearly its position. When you think it&#8217;s ok, just set border for it to none, example:</p>
<div class="bigimage"><img class="aligncenter size-full wp-image-2267" title="Photoshop - Top Search Panel" src="http://aext.net/wp-contents/uploads/2009/12/Photoshop-Top-Search-Panel.png" alt="" width="500" height="176" /></div>
<p>I don&#8217;t use the button for submit the form because who still want to click on that such submit button instead of enter in this century 21?</p>
<p>With logo, in Photoshop, select the selection of this logo layer, then navigate to Image &gt; Crop. Remember to hide the background and you will get the logo with transparent background.</p>
<div style="text-align: center;"><img class="aligncenter size-full wp-image-2270" title="Photoshop - Crop logo image" src="http://aext.net/wp-contents/uploads/2009/12/Photoshop-Crop-logo-image.png" alt="" width="254" height="41" /></div>
<p>Now, insert HTML code for your logo. However, don&#8217;t forget to put the a <strong>div</strong> with clear class to make sure there is no floating elements allowed on the left or the right side of your logo. That means your logo part will go down, it will not float on the header menu or search panel.</p>
<pre class="css">.clear {
    <span style="color: #88134f;">clear</span>: <span style="color: #9b4400;">both</span>;
}</pre>
<p>[smartads]</p>
<p>Insert it right after the end of header menu:</p>
<pre class="html"><span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"topsearch"</span><span style="color: #881280;">&gt;</span>

    .............

<span style="color: #881280;">&lt;/div&gt;</span>

<span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"clear"</span><span style="color: #881280;">&gt;&lt;/div&gt;</span>

<span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"logo"</span><span style="color: #881280;">&gt;</span>
    <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"FrozenFlirt Homepage"</span><span style="color: #881280;">&gt;&lt;h1&gt;</span>FrozenFlirt Theme<span style="color: #881280;">&lt;/h1&gt;&lt;/a&gt;</span>
    <span style="color: #881280;">&lt;h3&gt;</span>"Wordpress Theme From Scratch"<span style="color: #881280;">&lt;/h3&gt;</span>
<span style="color: #881280;">&lt;/div&gt;</span>

<span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"clear"</span><span style="color: #881280;">&gt;&lt;/div&gt;</span></pre>
<p>And css for it:</p>
<pre class="css"><em><span style="color: #236e25;">/*------- TOP LOGO -------*/</span></em>

#header #logo {
    <span style="color: #88134f;">float</span>: <span style="color: #9b4400;">left</span>;
    <span style="color: #88134f;">margin</span>: <span style="color: #0000ff;">20px</span> <span style="color: #0000ff;">0px</span>;
}

#header #logo h1 {
    <span style="color: #88134f;">background</span>: <span style="color: #9b4400;">transparent</span> <span style="color: #9b4400;">url</span><span style="color: #760f15;">(images/logo.png)</span> <span style="color: #9b4400;">no-repeat</span>;
    <span style="color: #88134f;">text-indent</span>: -<span style="color: #0000ff;">9999px</span>;
    <span style="color: #88134f;">width</span>: <span style="color: #0000ff;">253px</span>;
    <span style="color: #88134f;">height</span>: <span style="color: #0000ff;">39px</span>;
}

#header #logo h3 {
    <span style="color: #88134f;">margin-top</span>: <span style="color: #0000ff;">5px</span>;
    <span style="color: #88134f;">font-family</span>: Georgia, <span style="color: #760f15;">"Times New Roman"</span>, Times, <span style="color: #9b4400;">serif</span>;
    <span style="color: #88134f;">font-size</span>: <span style="color: #0000ff;">18px</span>;
    <span style="color: #88134f;">font-style</span>: <span style="color: #9b4400;">italic</span>;
    <span style="color: #88134f;">font-weight</span>: <span style="color: #9b4400;">normal</span>;
}</pre>
<p>Your header without clear one would be:</p>
<div class="bigimage"><img class="aligncenter size-full wp-image-2277" title="Photoshop - Header without clear" src="http://aext.net/wp-contents/uploads/2009/12/Photoshop-Header-without-clear.png" alt="" width="500" height="128" /></div>
<p>It would be better if using clear class:</p>
<div class="bigimage"><img class="aligncenter size-full wp-image-2278" title="Photoshop - Header using clear" src="http://aext.net/wp-contents/uploads/2009/12/Photoshop-Header-using-clear.png" alt="" width="500" height="92" /></div>
<h3>Main Content</h3>
<hr />
<p>In Photoshop, hold CTRL then select the gradient background on the top of main content to make a selection. Crop it, hide background behind and you will have the gradient background with transparent. Although you will see your selection is just a small selection, the image will be larger when you crop.</p>
<div class="bigimage"><img class="aligncenter size-full wp-image-2281" title="Photoshop - Gradient Background on top" src="http://aext.net/wp-contents/uploads/2009/12/Photoshop-Gradient-Background-on-top-e1261680100739.png" alt="" width="500" height="262" /></div>
<p>The following code is for the content:</p>
<pre class="html"><span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"main-content"</span><span style="color: #881280;">&gt;</span>
 <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"container"</span><span style="color: #881280;">&gt;</span>

     <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"post exerpt clearfix"</span><span style="color: #881280;">&gt;</span>
         <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #881280;">&gt;</span>
             <span style="color: #881280;">&lt;img </span><span style="color: #994500;">alt</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"ahh ahh ahh"</span><span style="color: #994500;">src</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"images/post-image-1.png"</span><span style="color: #994500;">width</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"200"</span><span style="color: #994500;">height</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"200"</span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"thumbnail"</span><span style="color: #881280;"> /&gt;</span>
         <span style="color: #881280;">&lt;/a&gt;</span>

         <span style="color: #881280;">&lt;h2&gt;&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #994500;">rel</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"nofollow"</span><span style="color: #881280;">&gt;</span>Fronze Flirt Theme<span style="color: #881280;">&lt;/a&gt;&lt;/h2&gt;</span>                
         <span style="color: #881280;">&lt;small&gt;</span>Written by <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Lam Nguyen"</span><span style="color: #881280;">&gt;</span>Lam Nguyen<span style="color: #881280;">&lt;/a&gt;</span> on <span style="color: #881280;">&lt;strong&gt;</span>Dec 11th<span style="color: #881280;">&lt;/strong&gt;</span> in <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Tutorial Category"</span><span style="color: #881280;">&gt;</span>Tutorials<span style="color: #881280;">&lt;/a&gt;&lt;/small&gt;</span>

         <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"summary"</span><span style="color: #881280;">&gt;</span>

            <span style="color: #881280;">&lt;p&gt;</span>Lorem ipsum dolor sit amet, this is bold text consectetur adipiscing elit. This font is in italic cras lacinia pellentesque elit nec sodales. Etiam vehicula egestas interdum. Nulla facilisi. In at lectus odio, quis iaculis dui. <span style="color: #881280;">&lt;/p&gt;</span>
            <span style="color: #881280;">&lt;p&gt;&lt;a </span><span style="color: #994500;">rel</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"nofollow"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Read more this post"</span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #881280;">&gt;</span>Continue Reading <span style="color: #881280;">&amp;raquo;&lt;/a&gt;&lt;/p&gt;</span>

         <span style="color: #881280;">&lt;/div&gt;</span>
     <span style="color: #881280;">&lt;/div&gt;</span>    

 <span style="color: #881280;">&lt;/div&gt;</span>
<span style="color: #881280;">&lt;/div&gt;</span></pre>
<div class="bigimage"><a href="http://aext.net/wp-contents/uploads/2009/12/Photoshop-Content-with-gradient-background1.png"><img class="aligncenter size-full wp-image-2283" title="Photoshop - Content with gradient background" src="http://aext.net/wp-contents/uploads/2009/12/Photoshop-Content-with-gradient-background1.png" alt="" width="500" /></a></div>
<p>CSS for it:</p>
<pre class="css"><em><span style="color: #236e25;">/*------ MAIN CONTENT -------*/</span></em>
#main-content {
    <span style="color: #88134f;">width</span>: <span style="color: #0000ff;">574px</span>;
    <span style="color: #88134f;">background-color</span>: <span style="color: #760f15;">#FFFFFF</span>;
    <span style="color: #88134f;">border</span>: <span style="color: #9b4400;">solid</span> <span style="color: #0000ff;">1px</span> <span style="color: #760f15;">#bbbbbb</span>;
    <span style="color: #88134f;">padding</span>: <span style="color: #0000ff;">1px</span>;
    <span style="color: #88134f;">float</span>: <span style="color: #9b4400;">left</span>;
}

#main-content .container {
    <span style="color: #88134f;">width</span>: <span style="color: #9b4400;">auto</span>;
    <span style="color: #88134f;">padding</span>: <span style="color: #0000ff;">20px</span>;
    <span style="color: #88134f;">background</span>: <span style="color: #9b4400;">url</span><span style="color: #760f15;">(images/gradient.png)</span> <span style="color: #9b4400;">repeat-x</span>;
    <span style="color: #88134f;">border</span>: <span style="color: #9b4400;">none</span>;
}

.post {
    <span style="color: #88134f;">display</span>: <span style="color: #9b4400;">block</span>;
    <span style="color: #88134f;">position</span>: <span style="color: #9b4400;">relative</span>;
    <span style="color: #88134f;">font-size</span>: <span style="color: #0000ff;">100%</span>;
    <span style="color: #88134f;">border-bottom</span>:<span style="color: #0000ff;">1px</span> <span style="color: #9b4400;">solid</span> <span style="color: #760f15;">#DFDDD5</span>;
    <span style="color: #88134f;">margin-bottom</span>:<span style="color: #0000ff;">25px</span>;
    <span style="color: #88134f;">padding-bottom</span>:<span style="color: #0000ff;">5px</span>;
}

.post .thumbnail {
    <span style="color: #88134f;">float</span>:<span style="color: #9b4400;">left</span>;
    <span style="color: #88134f;">margin-right</span>:<span style="color: #0000ff;">15px</span>;
    <span style="color: #88134f;">margin-bottom</span>:<span style="color: #0000ff;">15px</span>;
    <span style="color: #88134f;">width</span>:<span style="color: #0000ff;">200px</span>;
    <span style="color: #88134f;">height</span>:<span style="color: #0000ff;">200px</span>;
}

.post h2 {
    <span style="color: #88134f;">font-family</span>: Helvetica, Arial, <span style="color: #9b4400;">sans-serif</span>;
    <span style="color: #88134f;">font-size</span>: <span style="color: #0000ff;">2em</span>;
    <span style="color: #88134f;">letter-spacing</span>:-<span style="color: #0000ff;">0</span>.<span style="color: #0000ff;">04em</span>;
    <span style="color: #88134f;">line-height</span>: <span style="color: #0000ff;">1</span>.<span style="color: #0000ff;">05em</span>;
    <span style="color: #88134f;">padding-bottom</span>: <span style="color: #0000ff;">5px</span>;
}

.post h2 a {
    <span style="color: #88134f;">color</span>: <span style="color: #760f15;">#000000</span>;
    <span style="color: #88134f;">text-decoration</span>: <span style="color: #9b4400;">none</span>;
}

.post h2 a:hover {
    <span style="color: #88134f;">text-decoration</span>: <span style="color: #9b4400;">underline</span>;
}

.post small {
    <span style="color: #88134f;">background-color</span>:<span style="color: #760f15;">#B50505</span>;
    <span style="color: #88134f;">padding</span>:<span style="color: #0000ff;">3px</span>;
    <span style="color: #88134f;">padding-left</span>:<span style="color: #0000ff;">8px</span>;
    <span style="color: #88134f;">padding-right</span>:<span style="color: #0000ff;">8px</span>;
    <span style="color: #88134f;">color</span>:<span style="color: #760f15;">#fffffe</span>;
    <span style="color: #88134f;">font-size</span>:<span style="color: #0000ff;">0</span>.<span style="color: #0000ff;">85em</span>;
}

.post small a {
    <span style="color: #88134f;">color</span>:<span style="color: #760f15;">#fffffe</span>;
    <span style="color: #88134f;">text-decoration</span>:<span style="color: #9b4400;">none</span>;
}
.post small a:hover {
    <span style="color: #88134f;">text-decoration</span>:<span style="color: #9b4400;">underline</span>;
    <span style="color: #88134f;">color</span>:<span style="color: #760f15;">#fffffe</span>;
}
.post .summary {
    <span style="color: #88134f;">display</span>:<span style="color: #9b4400;">block</span>;
    <span style="color: #88134f;">font-style</span>: <span style="color: #9b4400;">italic</span>;
    <span style="color: #88134f;">margin-top</span>:<span style="color: #0000ff;">20px</span>;
    <span style="color: #88134f;">float</span>:<span style="color: #9b4400;">left</span>;
    <span style="color: #88134f;">width</span>:<span style="color: #0000ff;">300px</span>;
}

.post p {
    <span style="color: #88134f;">padding-bottom</span>:<span style="color: #0000ff;">2em</span>;
}</pre>
<p>Duplicate this post for many times, you will have a list of posts in homepage or categories posts listing.</p>
<p>You should use WP-Pagenavi plugin for pagination because it is a popular pagination plugin for WordPress. Please write your HTML code as that plugin will generate. In the HTML file, use these code for pagination:</p>
<pre class="html">                <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"wp-pagenavi"</span><span style="color: #881280;">&gt;</span>
                    <span style="color: #881280;">&lt;span </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"pages"</span><span style="color: #881280;">&gt;</span>Page 1 of 8<span style="color: #881280;">&lt;/span&gt;</span>
                    <span style="color: #881280;">&lt;span </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"current"</span><span style="color: #881280;">&gt;</span>1<span style="color: #881280;">&lt;/span&gt;</span>
                    <span style="color: #881280;">&lt;a </span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"2"</span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"page"</span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"http://aext.net/page/2/"</span><span style="color: #881280;">&gt;</span>2<span style="color: #881280;">&lt;/a&gt;</span>
                    <span style="color: #881280;">&lt;a </span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"3"</span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"page"</span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"http://aext.net/page/3/"</span><span style="color: #881280;">&gt;</span>3<span style="color: #881280;">&lt;/a&gt;</span>
                    <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"http://aext.net/page/2/"</span><span style="color: #881280;">&gt;&amp;raquo;&lt;/a&gt;</span>
                    <span style="color: #881280;">&lt;span </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"extend"</span><span style="color: #881280;">&gt;</span>...<span style="color: #881280;">&lt;/span&gt;</span>
                    <span style="color: #881280;">&lt;a </span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Last &amp;raquo;"</span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"last"</span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"http://aext.net/page/8/"</span><span style="color: #881280;">&gt;</span>Last <span style="color: #881280;">&amp;raquo;&lt;/a&gt;</span>
                <span style="color: #881280;">&lt;/div&gt;</span></pre>
<p>The pagination temporary looks like this:</p>
<div class="bigimage"><img class="aligncenter size-full wp-image-2272" title="Photoshop - Pagination" src="http://aext.net/wp-contents/uploads/2009/12/Photoshop-Pagination.png" alt="" width="500" height="355" /></div>
<p>Copy css file of WP-Pagenavi plugin and replace it with:</p>
<pre class="css"><em><span style="color: #236e25;">/* +----------------------------------------------------------------+ |                                                                | |   WordPress 2.5 Plugin: WP-PageNavi 2.31                       | |   Copyright (c) 2008 Lester "GaMerZ" Chan                      | |                                                                | |   File Written By:                                             | |   - Lester "GaMerZ" Chan                                       | |   - http://lesterchan.net                                      | |                                                                | |   File Information:                                            | |   - Page Navigation CSS Style                                  | |   - wp-content/plugins/wp-pagenavi/pagenavi-css.css            | |                                                                | +----------------------------------------------------------------+ */</span></em>

.wp-pagenavi {
    <span style="color: #88134f;">text-align</span>: <span style="color: #9b4400;">right</span>;
    <span style="color: #88134f;">font-size</span>: <span style="color: #0000ff;">14px</span>;
}

.wp-pagenavi a, .wp-pagenavi a:link {
    <span style="color: #88134f;">display</span>: <span style="color: #9b4400;">inline</span>;
    <span style="color: #88134f;">line-height</span>: <span style="color: #0000ff;">80%</span>;
    <span style="color: #88134f;">text-align</span>: <span style="color: #9b4400;">center</span>;
    <span style="color: #88134f;">margin</span>: <span style="color: #0000ff;">2px</span>;
    <span style="color: #88134f;">text-decoration</span>: <span style="color: #9b4400;">none</span>;
    <span style="color: #88134f;">color</span>:<span style="color: #760f15;">#333333</span>;
    <span style="color: #88134f;">background-color</span>: <span style="color: #760f15;">#cacaca</span>;
    <span style="color: #88134f;">padding</span>: <span style="color: #0000ff;">3px</span> <span style="color: #0000ff;">8px</span>;
}
.wp-pagenavi a:visited {
}
.wp-pagenavi a:hover {
    <span style="color: #88134f;">background-color</span>: <span style="color: #760f15;">#B40000</span>;
    <span style="color: #88134f;">color</span>:<span style="color: #760f15;">#FFFFFF</span>;
}
.wp-pagenavi a:active {
    <span style="color: #88134f;">color</span>:<span style="color: #760f15;">#FFFFFF</span>;
}
.wp-pagenavi span.pages {
    <span style="color: #88134f;">min-width</span>: <span style="color: #0000ff;">14px</span>;
    <span style="color: #88134f;">line-height</span>: <span style="color: #0000ff;">80%</span>;
    <span style="color: #88134f;">text-align</span>: <span style="color: #9b4400;">center</span>;
    <span style="color: #88134f;">padding</span>: <span style="color: #0000ff;">8px</span> <span style="color: #0000ff;">6px</span> <span style="color: #0000ff;">8px</span> <span style="color: #0000ff;">0px</span> <span style="color: #9b4400;">!important</span>;
    <span style="color: #88134f;">text-decoration</span>: <span style="color: #9b4400;">none</span>;
    <span style="color: #88134f;">float</span>: <span style="color: #9b4400;">left</span>;
}
.wp-pagenavi span.current {
    <span style="color: #88134f;">display</span>: <span style="color: #9b4400;">inline-block</span>;
    <span style="color: #88134f;">text-align</span>: <span style="color: #9b4400;">center</span>;
    <span style="color: #88134f;">margin</span>: <span style="color: #0000ff;">2px</span>;
    <span style="color: #88134f;">text-decoration</span>: <span style="color: #9b4400;">none</span>;
    <span style="color: #88134f;">color</span>:<span style="color: #760f15;">#fff</span>;
    <span style="color: #88134f;">background-color</span>: <span style="color: #760f15;">#B40000</span>;
    <span style="color: #88134f;">margin-left</span>:<span style="color: #0000ff;">3px</span>;
    <span style="color: #88134f;">padding</span>: <span style="color: #0000ff;">3px</span> <span style="color: #0000ff;">8px</span>;
}
.wp-pagenavi span.extend {
    <span style="color: #88134f;">display</span>: <span style="color: #9b4400;">inline-block</span>;
    <span style="color: #88134f;">line-height</span>: <span style="color: #0000ff;">22px</span>;
    <span style="color: #88134f;">min-width</span>: <span style="color: #0000ff;">18px</span>;
    <span style="color: #88134f;">padding</span>: <span style="color: #0000ff;">0px</span> <span style="color: #0000ff;">3px</span> <span style="color: #0000ff;">0px</span> <span style="color: #0000ff;">3px</span>;
    <span style="color: #88134f;">text-align</span>: <span style="color: #9b4400;">center</span>;
    <span style="color: #88134f;">margin</span>: <span style="color: #0000ff;">2px</span>;
    <span style="color: #88134f;">text-decoration</span>: <span style="color: #9b4400;">none</span>;
    <span style="color: #88134f;">color</span>:<span style="color: #760f15;">#333333</span>;
}</pre>
<p>Here is your result:</p>
<div class="bigimage"><img class="aligncenter size-full wp-image-2274" title="Photoshop - Pagination 2" src="http://aext.net/wp-contents/uploads/2009/12/Photoshop-Pagination-2.png" alt="" width="500" height="116" /></div>
<h3>Sidebar</h3>
<hr />
<p>For the popular posts widget, I suggest you using <a href="http://wordpress.org/extend/plugins/wordpress-popular-posts/">WordPress Popular Posts Plugin</a>. The default code that plugin will generate is:</p>
<pre class="html">                <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"widget"</span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"popular-posts"</span><span style="color: #881280;">&gt;</span>
                    <span style="color: #881280;">&lt;h3&gt;</span>Popular Posts<span style="color: #881280;">&lt;/h3&gt;</span>
                    <span style="color: #881280;">&lt;ul&gt;</span>
                    <em><span style="color: #236e25;">&lt;!-- WordPress Popular Posts Plugin v1.5.0 --&gt;</span></em>
                        <span style="color: #881280;">&lt;li&gt;&lt;a </span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"blablabla"</span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #881280;">&gt;&lt;span </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"wpp-post-title"</span><span style="color: #881280;">&gt;</span>5 New Useful jQuery Plugins For Your Next Projects<span style="color: #881280;">&lt;/span&gt;&lt;/a&gt;</span> <span style="color: #881280;">&lt;/li&gt;</span>
                        <span style="color: #881280;">&lt;li&gt;&lt;a </span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"blablabla"</span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #881280;">&gt;&lt;span </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"wpp-post-title"</span><span style="color: #881280;">&gt;</span>35 Fresh and Cool Web Design Interfaces for Inspiration<span style="color: #881280;">&lt;/span&gt;&lt;/a&gt;</span> <span style="color: #881280;">&lt;/li&gt;</span>
                        <span style="color: #881280;">&lt;li&gt;&lt;a </span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"blablabla"</span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #881280;">&gt;&lt;span </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"wpp-post-title"</span><span style="color: #881280;">&gt;</span>Bubble Effect with CSS<span style="color: #881280;">&lt;/span&gt;&lt;/a&gt;</span> <span style="color: #881280;">&lt;/li&gt;</span>
                        <span style="color: #881280;">&lt;li&gt;&lt;a </span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"blablabla"</span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #881280;">&gt;&lt;span </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"wpp-post-title"</span><span style="color: #881280;">&gt;</span>CSS Absolute Positioning: Create A Fancy Link Block<span style="color: #881280;">&lt;/span&gt;&lt;/a&gt;</span> <span style="color: #881280;">&lt;/li&gt;</span>
                        <span style="color: #881280;">&lt;li&gt;&lt;a </span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"blablabla"</span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"#"</span><span style="color: #881280;">&gt;&lt;span </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"wpp-post-title"</span><span style="color: #881280;">&gt;</span>Incredible Drop Down Menu Solution With CSS Only<span style="color: #881280;">&lt;/span&gt;&lt;/a&gt;</span> <span style="color: #881280;">&lt;/li&gt;</span>
                    <span style="color: #881280;">&lt;/ul&gt;</span>
                    <em><span style="color: #236e25;">&lt;!-- End WordPress Popular Posts Plugin v1.5.0 --&gt;</span></em>
                <span style="color: #881280;">&lt;/div&gt;</span></pre>
<p>Because we need to build a sidebar with widget ready, so it depends on what widgets you will use. CSS code for the whole sidebar I&#8217;m using is simple as:</p>
<pre class="css"><em><span style="color: #236e25;">/*------SIDEBAR-------*/</span></em>

#sidebar {
    <span style="color: #88134f;">float</span>: <span style="color: #9b4400;">right</span>;
    <span style="color: #88134f;">width</span>: <span style="color: #0000ff;">314px</span>;
}

#sidebar .widget {
    <span style="color: #88134f;">margin-bottom</span>: <span style="color: #0000ff;">25px</span>;
}

#sidebar .widget h3 {
    <span style="color: #88134f;">font-family</span>: <span style="color: #760f15;">"Myriad Pro"</span>, Helvetica, Arial;
    <span style="color: #88134f;">font-size</span>: <span style="color: #0000ff;">2</span>.<span style="color: #0000ff;">5em</span>;
    <span style="color: #88134f;">letter-spacing</span>:-<span style="color: #0000ff;">0</span>.<span style="color: #0000ff;">04em</span>;
    <span style="color: #88134f;">line-height</span>: <span style="color: #0000ff;">1</span>.<span style="color: #0000ff;">05em</span>;
    <span style="color: #88134f;">padding-bottom</span>: <span style="color: #0000ff;">5px</span>;
    <span style="color: #88134f;">color</span>: <span style="color: #760f15;">#000</span>;
    <span style="color: #88134f;">text-shadow</span>:<span style="color: #0000ff;">1px</span> <span style="color: #0000ff;">1px</span> <span style="color: #0000ff;">1px</span> <span style="color: #760f15;">#FFFFFF</span>;
}

#sidebar #adblocks {
    <span style="color: #88134f;">text-align</span>: <span style="color: #9b4400;">center</span>;
}

#sidebar #adblocks img {
    <span style="color: #88134f;">border</span>:<span style="color: #0000ff;">5px</span> <span style="color: #9b4400;">solid</span> <span style="color: #760f15;">#DFDFDF</span>;
    <span style="color: #88134f;">margin</span>:<span style="color: #0000ff;">0 5px</span> <span style="color: #0000ff;">5px</span>;
}

#sidebar .widget ul li {
    <span style="color: #88134f;">font-size</span>: <span style="color: #0000ff;">100%</span>;
    <span style="color: #88134f;">margin-bottom</span>: <span style="color: #0000ff;">5px</span>;
}

#sidebar .widget ul li a {
    <span style="color: #88134f;">background</span>: <span style="color: #9b4400;">url</span><span style="color: #760f15;">(images/606060.gif)</span> <span style="color: #9b4400;">no-repeat</span> <span style="color: #9b4400;">left</span> <span style="color: #0000ff;">3px</span>;
    <span style="color: #88134f;">padding-left</span>: <span style="color: #0000ff;">20px</span>;
    <span style="color: #88134f;">color</span>: <span style="color: #760f15;">#606060</span>;
    <span style="color: #88134f;">text-decoration</span>: <span style="color: #9b4400;">none</span>;
}

#sidebar .widget ul li a:hover {
    <span style="color: #88134f;">background</span>: <span style="color: #9b4400;">url</span><span style="color: #760f15;">(images/B40000.gif)</span> <span style="color: #9b4400;">no-repeat</span> <span style="color: #9b4400;">left</span> <span style="color: #0000ff;">3px</span>;
    <span style="color: #88134f;">color</span>: <span style="color: #760f15;">#B40000</span>;
}</pre>
<h3>Some others footer stuffs</h3>
<hr />
<p>In this theme, I&#8217;m using Flickr Stream and Twitter Update. Someone love to use plugins to fetch data from their Flickr and Twitter account but I like to use javascript to handle it.</p>
<pre class="html">            <span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"flickr-stream"</span><span style="color: #881280;">&gt;</span>

                <span style="color: #881280;">&lt;h3&gt;</span>Flickr Stream<span style="color: #881280;">&lt;/h3&gt;</span>
                <span style="color: #881280;">&lt;hr /&gt;</span>
                <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"clear"</span><span style="color: #881280;">&gt;&lt;/div&gt;</span>
                <span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"flickr"</span><span style="color: #881280;">&gt;</span>
                    <span style="color: #881280;">&lt;noscript&gt;</span>Your message for people w/o javascript enabled goes here.<span style="color: #881280;">&lt;/noscript&gt;</span>
                <span style="color: #881280;">&lt;/div&gt;</span>

            <span style="color: #881280;">&lt;/div&gt;</span>      

            <span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"twitter-update"</span><span style="color: #881280;">&gt;</span>
                <span style="color: #881280;">&lt;h3&gt;</span>Twitter Update<span style="color: #881280;">&lt;/h3&gt;</span>
                <span style="color: #881280;">&lt;hr /&gt;</span>
                <span style="color: #881280;">&lt;div </span><span style="color: #994500;">class</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"clear"</span><span style="color: #881280;">&gt;&lt;/div&gt;</span>
                <span style="color: #881280;">&lt;div </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"twitter"</span><span style="color: #881280;">&gt;</span>
                    <span style="color: #881280;">&lt;ul </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">'twitter_update_list'</span><span style="color: #881280;">&gt;&lt;/ul&gt;</span>
                <span style="color: #881280;">&lt;/div&gt;</span>
                <span style="color: #881280;">&lt;a </span><span style="color: #994500;">href</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"http://twitter.com/prlamnguyen"</span><span style="color: #994500;">title</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"Follow me on twitter"</span><span style="color: #881280;">&gt;&lt;span </span><span style="color: #994500;">id</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"followme"</span><span style="color: #881280;">&gt;</span>Follow Me!<span style="color: #881280;">&lt;/span&gt;&lt;/a&gt;</span>

            <span style="color: #881280;">&lt;/div&gt;</span></pre>
<p>Add 2 lines of html code here at the end of your HTML file before closing body tag to display twitter update. Change it to your twitter username and the number of tweet you wanna display:</p>
<pre class="html">    <span style="color: #881280;">&lt;script </span><span style="color: #994500;">type</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"text/javascript"</span><span style="color: #994500;">src</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"http://twitter.com/javascripts/blogger.js"</span><span style="color: #881280;">&gt;&lt;/script&gt;</span>
    <span style="color: #881280;">&lt;script </span><span style="color: #994500;">type</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"text/javascript"</span><span style="color: #994500;">src</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"http://twitter.com/statuses/user_timeline/prlamnguyen.json?callback=twitterCallback2&amp;count=2"</span><span style="color: #881280;">&gt;&lt;/script&gt;</span></pre>
<p>Javascript to display Flickr stream:</p>
<pre class="html"><span style="color: #881280;">&lt;script </span><span style="color: #994500;">type</span><span style="color: #881280;">=</span><span style="color: #1a1aa6;">"text/javascript"</span><span style="color: #881280;">&gt;</span>

<span style="color: #881350;">function</span> <span style="color: #003369;">flickr</span>(id){

    $(<span style="color: #760f15;">"&lt;div&gt;"</span>).<span style="color: #003369;">attr</span>(<span style="color: #760f15;">"id"</span>, <span style="color: #760f15;">"photos"</span>).<span style="color: #003369;">prependTo</span>(<span style="color: #760f15;">"#flickr"</span>);

    <span style="color: #881350;">var</span> url = <span style="color: #760f15;">'http://api.flickr.com/services/feeds/photos_public.gne?id='</span>+ id +<span style="color: #760f15;">'&amp;format=json&amp;jsoncallback=?'</span>;

    $.<span style="color: #003369;">getJSON</span>( url , <span style="color: #881350;">function</span>(data){

        $.<span style="color: #003369;">each</span>(data.items, <span style="color: #881350;">function</span>(i,item){

            <span style="color: #881350;">var</span> mImg = item.media.m,
                sImg = (item.media.m).<span style="color: #003369;">replace</span>(<span style="color: #760f15;">"_m.jpg"</span>, <span style="color: #760f15;">"_s.jpg"</span>);

            $(<span style="color: #760f15;">"&lt;img/&gt;"</span>)
                .<span style="color: #003369;">attr</span>(<span style="color: #760f15;">"src"</span>, sImg)
                .<span style="color: #003369;">attr</span>(<span style="color: #760f15;">"id"</span>, <span style="color: #760f15;">"thumb"</span>)
                .<span style="color: #003369;">appendTo</span>(<span style="color: #760f15;">"#photos"</span>)
                .<span style="color: #003369;">wrap</span>(<span style="color: #760f15;">'&lt;a href="'</span> + item.link + <span style="color: #760f15;">'" title="'</span> + item.title + <span style="color: #760f15;">'" target="_blank" &gt;&lt;/a&gt;'</span>);

            <span style="color: #881350;">if</span>( i &gt;= <span style="color: #0000ff;">9</span> ) <span style="color: #881350;">return</span> <span style="color: #881350;">false</span>;

        });

    });
}

$(document).<span style="color: #003369;">ready</span>(<span style="color: #881350;">function</span>() {

    <span style="color: #881350;">var</span> id = <span style="color: #760f15;">'35591378@N03'</span>;
    <span style="color: #003369;">flickr</span>(id);

});

<span style="color: #881280;">&lt;/script&gt;</span></pre>
<p>Remember to implement jQuery framework to your theme.</p>
<h3>Conclusion</h3>
<hr />
<p>We have just walked throught the tutorial explains how to convert PSD layout to HTML. This is just for your blog homepage. However, other pages on your blog will change only the content part, from this layout, I can create a layout for display articles:</p>
<div class="bigimage"><a href="http://aext.net/wordpress-theme-tutorial/frozenflirt/single.html"><img class="aligncenter size-full wp-image-2289" title="FrozenFlirt WordPress Theme From Scratch - Single page" src="http://aext.net/wp-contents/uploads/2009/12/FrozenFlirt-Wordpress-Theme-From-Scratch-Single-page.png" alt="" width="500" /></a></div>
<ul>
<li>
<h3><a class="more" href="http://aext.net/2009/12/wordpress-theme-from-scratch-day-1-psd/">Download PSD Source</a></h3>
</li>
<li>
<h3><a href="http://aext.net/Downloads/FrozenFlirt-HTML.zip" target="_blank"><span class="more">Download HTML</span></a></h3>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://aext.net/2009/12/wordpress-theme-from-scratch-%e2%80%93-day-2-psd-to-html/feed/</wfw:commentRss>
		<slash:comments>36</slash:comments>
		</item>
	</channel>
</rss>

