<?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</title>
	<atom:link href="http://aext.net/tag/wordpress/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>Get a 360 Degree Security For Your WordPress Blog</title>
		<link>http://aext.net/2010/12/wordpress-360-degree-security/</link>
		<comments>http://aext.net/2010/12/wordpress-360-degree-security/#comments</comments>
		<pubDate>Wed, 29 Dec 2010 02:34:20 +0000</pubDate>
		<dc:creator>aextmag</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://aext.net/?p=7886</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/12/wordpress-360-degree-security/&service=su.pr&service_api=b57727e991c454bd2b2c62ff71462c79"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://aext.net/2010/12/wordpress-360-degree-security/" 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/12/wordpress-360-degree-security/&service=su.pr&service_api=b57727e991c454bd2b2c62ff71462c79"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://aext.net/2010/12/wordpress-360-degree-security/" height="61" width="51" /></a></p><p>Most of us are happy and contented using “Wordpress”; the so very popular blogging platform, as, it is fulfilling almost all our blogging requirements, but how long? Only till keep your WordPress blog secured from hackers or the worms of today that affect your blog. Why do I call them worms of today? There’s a reason for this. Where the worms were mischievous: like defacing your site, today, they attack without any prior signs and screw up your sites and even tend to eradicate you from Google list!!</p>
<p><a href="http://aext.net/2010/12/wordpress-360-degrees-security/"><img src="http://aext.net/wp-content/uploads/2010/12/360-wp.jpg" alt="" title="Get A 360 Degrees Security For Your WordPress Blog" width="500" height="231" class="aligncenter size-full wp-image-7894" /></a></p>
<p>It’s not that I am scaring the hell out of you; it has happened and may happen over and over again, if, you do not take precautions. </p>
<p>A stitch in time saves nine!! So, if you do not wish to drench yourself later, here are some tips to secure your blog from such worms and to block the holes that may occur during installation or after installing WordPress.</p>
<p><span id="more-7886"></span></p>
<h3>1. Update the software</h3>
<p><img src="http://aext.net/wp-content/uploads/2010/12/wordpress-update-now.png" alt="wordpress update now" title="wordpress update now" width="500" height="53" class="aligncenter size-full wp-image-7896" /></p>
<p>There is no as such software system which is completely impervious to bugs and susceptibilities. If you are thinking that something can go wrong with your site, soon you will be facing problems. There are frequent attempts to exploit all kinds of software by people who are experts in doing this, those, whom we call ‘HACKERS”!!A good way to fight them is to keep your software up- to- date. </p>
<p>This lesson was well clear to the WordPress users when in September 2009, a wave of attacks spread across sites which did not use the latest version of the software. I guess you won’t wish that to happen with you. Moreover, when it’s so simple to keep your WordPress site up-to- date, why should you take a risk? The best part is that for the latest versions, you have the option to install automatic updates. You also receive notifications for every new upgrade. Then why keep your blog away from it?</p>
<p><strong>If you aren’t using the latest version of WordPress, get it soon, as; sticking to the old one can invite the hackers with doors open. </strong></p>
<h3>2. Password considerations</h3>
<p><img src="http://aext.net/wp-content/uploads/2010/12/wordpress-strong-password.png" alt="wordpress strong password" title="wordpress strong password" width="500" height="119" class="aligncenter size-full wp-image-7898" /></p>
<p>Your user password keeps a hold of your blogging experience. So, a very important question is how to keep it protected. First of all, you should constantly keep changing your password to something that is out of the reach of one’s mind. What would make your password unique? Try avoiding common phrases and consider using numbers in your password. Having lower and upper case letters will confuse and make it different and the hacker will have to break his mind behind it.</p>
<p>When I ask you to constantly keep changing the password-I mean that change it at least once in six months. Another plus point for you is when you are using a program like ‘1 password for Mac or Windows’. It helps you to store your password secured in the browser and also find out strong and unique passwords, thereby, making it easy for you to change it.</p>
<h3>3. Secret keys for WP-Config</h3>
<p>The WP –Config PHP file in WordPress is an asset for you, as, it has all the database information which is needed by WordPress to connect its circuit-so to-speak. Not securing this file may lead to insecurity for the name, address, password of the MySQL database that stores all of your user info, blog posts and other valuable content. You may very well imagine now as to why it becomes necessary to use a secret key to prevent others from accessing your account. Now if you ask what a secret key is? It is a password with elements making it difficult to generate enough options to break through your security barriers.</p>
<p><em>How to install this secret key function:   Go to- <a href="https://api.wordpress.org/secret-key/1.1/">https://api.wordpress.org/secret-key/1.1/</a> and copy the results into this section of your wp-config.php file. And then you are ready to use a secret key for this section of your wp-config.php file.</em></p>
<h3>4. Htaccess File in Check</h3>
<p>This I consider as one of the most effective ideas. Once you have started using an htaccess file, you can lockdown your WP-admin directory by IP address. In more simple words, this will make sure that, only the IP addresses you specify, can access your admin dashboard URLs. Meaning, you are putting a ‘No Entry’ board for anyone else to try and hack your WordPress backend. To do this, simply create a file called .htaccess and add the following code to your file, replacing xxx.xxx.xxx.xxx with your IP address:</p>
<pre>
AuthUserFile /dev/null
AuthGroupFile /dev/null
AuthName "Access Control"
AuthType Basic
order deny,allow
deny from all
#IP address to Whitelist
allow from xxx.xxx.xxx.xxx
</pre>
<p>Also remember that you can add multiple “<strong>allow from</strong>” lines. So, make sure that you add any IP addresses you plan on accessing your site from (ie Home, Office, etc). Keep in mind that most ISP use dynamic IPs and so your IP address might change on occasion. In case, you get locked out, just update your .htaccess file or delete it all together. </p>
<p>However, this obviously is not a good tip if you allow open registrations as you need to allow your users access to WP-admin.</p>
<h3>5. Know Your File Permissions</h3>
<p><img src="http://aext.net/wp-content/uploads/2010/12/wordpress-chmod-777.png" alt="wordpress chmod 777" title="wordpress chmod 777" width="381" height="105" class="aligncenter size-full wp-image-7900" /></p>
<p>Do you leave files or folders with liberal permissions? Now, this brings in chances that the hackers will be able to gain access to your site which obviously will irritate you.  It is your WordPress installation method or the default practices from your webhost, on which the permission for files depends and at times may not be apt.      </p>
<p>To know and understand as to what permissions are acceptable you can read it on <a href="http://codex.wordpress.org/Changing_File_Permissions">WordPress Codex</a>. You should also know that File and directory permissions can be changed either via an FTP client or within the administrative page from your web host.</p>
<h3>6. Avoid using admin account </h3>
<p>Using an admin account is like inviting the hackers for a battle and that too when you have no weapons with you. Actually, admin account is the default user account which is created with every WordPress installation. Knowing this; the hackers can, without too much thoughts, launch a dictionary in your site and surmise your password. So play a safe part and change or delete the username of admin account.</p>
<h3>Imply them:</h3>
<p>Now, when you have so many easy and effective options, will you still be carefree with your WordPress blogs? I don’t think so. Anyways, these are just few ways of securing your blogs from the irritating bugs.  You can also make use of certain WordPress plugins like WP Security Scan, Secure WordPress and few other popular ones which provide protection to your blogs. Make use of them and these tips, because, ‘prevention is always better than cure’.</p>
<p><strong>This post was written by Andrew Paul, BDM with <a href="http://WordPressIntegration.com">WordPressIntegration</a>, company with a team of experts specialized in <a href="http://WordPressIntegration.com">PSD to WordPress</a> conversion and integration. You can connect with the author @<a href="http://twitter.com/andrewpaul123">andrewpaul123</a>  </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://aext.net/2010/12/wordpress-360-degree-security/feed/</wfw:commentRss>
		<slash:comments>14</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>Quick Tip: Display Timeago For WordPress If Less Than 24 Hours</title>
		<link>http://aext.net/2010/04/display-timeago-for-wordpress-if-less-than-24-hours/</link>
		<comments>http://aext.net/2010/04/display-timeago-for-wordpress-if-less-than-24-hours/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 08:32:32 +0000</pubDate>
		<dc:creator>Lief</dc:creator>
				<category><![CDATA[Quick Tips]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[WordPress Hack]]></category>
		<category><![CDATA[WordPress Tips]]></category>

		<guid isPermaLink="false">http://aext.net/?p=5098</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/04/display-timeago-for-wordpress-if-less-than-24-hours/&service=su.pr&service_api=b57727e991c454bd2b2c62ff71462c79"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://aext.net/2010/04/display-timeago-for-wordpress-if-less-than-24-hours/" 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/04/display-timeago-for-wordpress-if-less-than-24-hours/&service=su.pr&service_api=b57727e991c454bd2b2c62ff71462c79"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://aext.net/2010/04/display-timeago-for-wordpress-if-less-than-24-hours/" height="61" width="51" /></a></p><p>This small code snippet will help you to display the time ago for WordPress post if your post was published less than 24 hours ago. You can find some code published on other blogs that used for displaying the time different from now to the time when the post published like: &#8220;<em>minutes ago</em>&#8220;, &#8220;<em>hours ago</em>&#8220;, &#8220;<em>days ago</em>&#8220;&#8230; This code will display only when the different time is less than 24 hours.</p>
<p><span id="more-5098"></span></p>
<p>The completed code you need is below. Copy it and paste it to the functions.php file and you are ready to go. No more messing needed.</p>
<pre class="php"><span style="color: #003369;">add_filter</span>(<span style="color: #eb7300;">'the_time'</span>, <span style="color: #eb7300;">'timeago'</span>);

<span style="color: #881350;">function</span> <span style="color: #003369;">timeago</span>()
{
    <span style="color: #881350;">global</span> <span style="color: #825900;">$post</span>;

    <span style="color: #825900;">$date</span> = <span style="color: #825900;">$post</span>-&gt;post_date;

    <span style="color: #825900;">$time</span> = <span style="color: #003369;">get_post_time</span>(<span style="color: #eb7300;">'G'</span>, <span style="color: #881350;">true</span>, <span style="color: #825900;">$post</span>);

    <span style="color: #825900;">$time_diff</span> = <span style="color: #661aa9;">time</span>() - <span style="color: #825900;">$time</span>;

    <span style="color: #881350;">if</span>( <span style="color: #825900;">$time_diff</span> &gt; <span style="color: #0000ff;">0</span> &amp;&amp; <span style="color: #825900;">$time_diff</span> &lt; <span style="color: #0000ff;">24</span>*<span style="color: #0000ff;">60</span>*<span style="color: #0000ff;">60</span> )
        <span style="color: #825900;">$display</span> = <span style="color: #661aa9;">sprintf</span>( <span style="color: #003369;">__</span>(<span style="color: #eb7300;">'%s ago'</span>), <span style="color: #003369;">human_time_diff</span>( <span style="color: #825900;">$time</span> ) );
    <span style="color: #881350;">else</span>
        <span style="color: #825900;">$display</span> = <span style="color: #661aa9;">date</span>(<span style="color: #003369;">get_option</span>(<span style="color: #eb7300;">'date_format'</span>), <span style="color: #661aa9;">strtotime</span>(<span style="color: #825900;">$date</span>) );

    <span style="color: #881350;">return</span> <span style="color: #825900;">$display</span>;
}</pre>
<p>This code will hook into the <span style="color: #003369; font-family: monospace;">the_time()</span> function. It will do the filter which modify the return value of <span style="color: #003369; font-family: monospace;">the_time()</span> before sending it to the browser screen.</p>
<p>The output:</p>
<pre style="font-family: Consolas, 'Andale Mono WT', 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace;">Published:  5 minutes ago
Published:  12 hours ago

Or

Published:  March 14, 2010 //Depends on your date format setting</pre>
<p><strong>Don&#8217;t forget to subscribe to <a href="http://feeds.feedburner.com/aextnet">our rss feed</a> to receive full code snippets and articles via feed reader or follow us on <a href="http://twitter.com/aextnet">twitter</a>.</strong></p>
<div class="txtad-cont"></div>
]]></content:encoded>
			<wfw:commentRss>http://aext.net/2010/04/display-timeago-for-wordpress-if-less-than-24-hours/feed/</wfw:commentRss>
		<slash:comments>48</slash:comments>
		</item>
		<item>
		<title>Most Wanted Business/Magazine WordPress Premium Themes</title>
		<link>http://aext.net/2010/03/most-wanted-businessmagazine-wordpress-premium-themes/</link>
		<comments>http://aext.net/2010/03/most-wanted-businessmagazine-wordpress-premium-themes/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 06:05:58 +0000</pubDate>
		<dc:creator>Jilson Thomas</dc:creator>
				<category><![CDATA[Themes]]></category>
		<category><![CDATA[magazine]]></category>
		<category><![CDATA[themes]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://aext.net/?p=4154</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/03/most-wanted-businessmagazine-wordpress-premium-themes/&service=su.pr&service_api=b57727e991c454bd2b2c62ff71462c79"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://aext.net/2010/03/most-wanted-businessmagazine-wordpress-premium-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/03/most-wanted-businessmagazine-wordpress-premium-themes/&service=su.pr&service_api=b57727e991c454bd2b2c62ff71462c79"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://aext.net/2010/03/most-wanted-businessmagazine-wordpress-premium-themes/" height="61" width="51" /></a></p><p>You may have your own blog or working for someone else. What ever may be the content of the blog, the theme of the blog gives the first impression about the blog to the reader. If your theme is very interactive and user friendly, then reader will probably enjoy it. If you are serious about your blog, you should have a serious theme.  If you have a design or technical related blog, you probably don&#8217;t want to miss this showcase.</p>
<p>In the showcase below, I tried to include some of the highest rated magazine/business WordPress themes voted on by bloggers and designers.  Once you have a licence for the theme, you are (of course) free to edit it to fit for your requirements.  Here are some premium themes that will get you noticed, for sure.</p>
<p><span id="more-4154"></span></p>
<p>All descriptions are from the theme designers themselves.</p>
<h3><a href="http://themeforest.net/item/agivee-corporate-business-wordpress-theme/89357?ref=myjilson" target="_blank">Agivee &#8211; Corporate Business WordPress Theme ($32)</a></h3>
<div class="bigimage"><a href="http://themeforest.net/item/agivee-corporate-business-wordpress-theme/full_screen_preview/89357?ref=myjilson" target="_blank"><img src="http://smashingwebs.com/wp-content/uploads/2010/3/aext/1.jpg" alt="" title="1" width="500" height="254" class="aligncenter size-medium wp-image-4249" /></a></div>
<p>Agivee wordpress theme will give your business or company website a smart and professional look. It&#8217;s widget ready and works fine in all versions of wordpress. It&#8217;s easy to maintain and rich of features. You can find out some of the cool jQuery slide show, Auto image resizing, built in ajax contact form etc.</p>
<hr style="margin-bottom: 35px"/>
<h3><a href="http://themeforest.net/item/our-magazine/32807?ref=myjilson" target="_blank">Our Magazine ($32)</a></h3>
<div class="bigimage"><a href="http://themeforest.net/item/our-magazine/full_screen_preview/32807?ref=myjilson" target="_blank"><img class="alignnone" src="http://smashingwebs.com/wp-content/uploads/2010/3/aext/2.gif" alt="" width="510" height="259" /></a></div>
<p>A powerful WordPress theme special for online magazine, community,  network or any site with rich content. It is modern, clean, and sexy ~ I just liked the color combination of this theme. It&#8217;s pretty good na ?</p>
<p>Our Magazine comes with 2 color variations, a slider for headline  news, auto image resizing, advance theme option. It also provide a  highly demand user link feed to allow your reader to submit news,  example <a href="http://psd.tutsplus.com/">http://psd.tutsplus.com/</a> and <a href="http://kailoon.com/">http://kailoon.com</a>.</p>
<hr style="margin-bottom: 35px"/>
<h3><a href="http://themeforest.net/item/newscast-4-in-1-magazine-and-blog-template/88548?ref=myjilson" target="_blank">Newscast 4 in 1 &#8211; Magazine and Blog Template ($22)</a></h3>
<div class="bigimage"><a href="http://themeforest.net/item/newscast-4-in-1-magazine-and-blog-template/full_screen_preview/88548?ref=myjilson" target="_blank"><img class="alignnone" src="http://smashingwebs.com/wp-content/uploads/2010/3/aext/6.gif" alt="" width="510" height="259" /></a></div>
<p>I think, You don&#8217;t wanna miss this lovely theme. Newscast is a  HTML  Template, best suited for Magazines and Blogs. It  comes with 3 fantastic Image and News slideshows has multiple Page  templates and of course gives you the option to choose from 4 Fantastic  skins:</p>
<hr style="margin-bottom: 35px"/>
<h3 class="item-name"><a href="http://themeforest.net/item/magnifizine-a-magazine-business-wordpress-theme/81920?ref=myjilson" target="_blank">Magnifizine: A Magazine &amp; Business WordPress  Theme (<span>$</span>32)</a></h3>
<div class="bigimage"><a href="http://themeforest.net/item/magnifizine-a-magazine-business-wordpress-theme/full_screen_preview/81920?ref=myjilson" target="_blank"><img class="alignnone" src="http://smashingwebs.com/wp-content/uploads/2010/3/aext/7.gif" alt="" width="510" height="259" /></a></div>
<p>Magnifizine is a stylish and modern looking WordPress theme designed  primarily for magazine and business websites. It comes crammed with  features Including a custom slider that comes in three sizes and plays  Flash and YouTube videos.</p>
<hr style="margin-bottom: 35px"/>
<h3 class="item-name"><a href="http://themeforest.net/item/global-press-a-premium-magazine-wordpress-theme/84602?ref=myjilson" target="_blank">Global Press &#8211; A Premium Magazine WordPress Theme (<span>$</span>32)</a></h3>
<div class="bigimage"><a href="http://themeforest.net/item/global-press-a-premium-magazine-wordpress-theme/full_screen_preview/84602?ref=myjilson" target="_blank"><img class="alignnone" src="http://smashingwebs.com/wp-content/uploads/2010/3/aext/8.gif" alt="" width="510" height="259" /></a></div>
<p>Global Press is a premium news, portal or magazine WordPress theme. It  is very lightweight, almost no images are used. It include a lot of  custom features and is easy to use. Itâ€™s perfect for almost everyone who  want to write articles, news, or publish an online magazine.</p>
<hr style="margin-bottom: 35px"/>
<h3 class="item-name"><a href="http://themeforest.net/item/liquid-magazine-unique-fluid-grid-layout/60637?ref=myjilson" target="_blank">Liquid Magazine &#8211; Unique Fluid Grid Layout (<span>$</span>27)</a></h3>
<div class="bigimage"><a href="http://themeforest.net/item/liquid-magazine-unique-fluid-grid-layout/full_screen_preview/60637?ref=myjilson" target="_blank"><img class="alignnone" src="http://smashingwebs.com/wp-content/uploads/2010/3/aext/9.gif" alt="" width="510" height="259" /></a></div>
<p>This is <strong>one of a kind theme</strong>, there are no analogs on  ThemeForest <img src="http://themeforest.net/images/smileys/wink.png" alt=";)" /> It will suits best for the blog with creative  posts. Different thumbnails height is giving a special â€œstyleâ€ to the  template, your visitors will love it!</p>
<hr style="margin-bottom: 35px"/>
<h3 class="item-name"><a href="http://www.woothemes.com/2009/11/headlines/" target="_blank">Headlines Premium WordPress Theme</a></h3>
<div class="bigimage"><a href="http://www.woothemes.com/demo/?name=headlines" target="_blank"><img class="alignnone" src="http://smashingwebs.com/wp-content/uploads/2010/3/aext/12.gif" alt="" width="510" height="259" /></a></div>
<p>Some of the Features for this theme is follows. I know you may like this.</p>
<ul>
<li>Featured jQuery tabber/slider area above normal posts to showcase  your favorite posts. Can be static or set to slide automatically with  built in options.</li>
<li>Show your latest tweet in the header (instead of 468Ã—60 ad space)</li>
<li>A custom social bookmark option at the bottom of single posts to  share your writings with ease!</li>
</ul>
<hr style="margin-bottom: 35px"/>
<h3 class="item-name"><a href="http://www.woothemes.com/2009/11/headlines/" target="_blank">My Stream: Premium WordPress theme</a></h3>
<div class="bigimage"><a href="http://www.woothemes.com/demo/?name=mystream" target="_blank"><img class="alignnone" src="http://smashingwebs.com/wp-content/uploads/2010/3/aext/13.gif" alt="" width="510" height="259" /></a></div>
<p>MyStream is a flexible and extremely customizable personal blog theme  with massive social media &amp; lifestreaming influences. Change the  background to your visual identity, move the many available widgets  around and VOILA: you have YourStream.</p>
<hr style="margin-bottom: 35px"/>
<h3 class="item-name"><a href="http://www.woothemes.com/2009/04/aperture/" target="_blank">Aperture WordPress theme</a></h3>
<div class="bigimage"><a href="http://www.woothemes.com/demo/?name=aperture" target="_blank"><img class="alignnone" src="http://smashingwebs.com/wp-content/uploads/2010/3/aext/14.gif" alt="" width="510" height="259" /></a></div>
<p>Aperture is a multi-functional photo-blogging theme with a unique home  page, consisting of a latest posts slider, a visual category display, a  blog module and lots of stylish widgetized spaces. With 12 alternate  styles and a very visual archive system you should be able to house your  photos/portfolio proudly in a theme that caters specifically for your  needs.</p>
<hr style="margin-bottom: 35px"/>
<h3 class="item-name"><a href="http://www.woothemes.com/2009/02/newsport/" target="_blank">Newsport WordPress theme</a></h3>
<div class="bigimage"><a href="http://www.woothemes.com/demo/?name=newsport" target="_blank"><img class="alignnone" src="http://smashingwebs.com/wp-content/uploads/2010/3/aext/15.gif" alt="" width="510" height="259" /></a></div>
<p>Newsport is a stylish magazine theme aimed at those who want a more  professional feel to their site. It includes a well laid out front page  that showcases all your news with images, and also a cool category news  feed on the side so that all content of your site gets to shine.</p>
<hr style="margin-bottom: 35px"/>
<h3 class="item-name"><a href="http://www.woothemes.com/2009/03/groovy-video/" target="_blank">Groovy-Video WordPress theme</a></h3>
<div class="bigimage"><a href="http://www.woothemes.com/demo/?name=groovy-video" target="_blank"><img class="alignnone" src="http://smashingwebs.com/wp-content/uploads/2010/3/aext/16.gif" alt="" width="510" height="259" /></a></div>
<p>Groovy Video is a colourful, funky video blogging  theme, which is sure to put you at the top of the pile. Video blogging  (vlogging) is trendy right now (all the cool kids are doing it), so do  get your groove on with this theme! Get it? Got it? Good!</p>
<hr style="margin-bottom: 35px"/>
<h3 class="item-name"><a href="http://themeforest.net/item/noctis-theme/56749?ref=myjilson" target="_blank">Noctis Theme (<span>$</span>27)</a></h3>
<div class="bigimage"><a href="http://themeforest.net/item/noctis-theme/full_screen_preview/56749?ref=myjilson" target="_blank"><img class="alignnone" src="http://smashingwebs.com/wp-content/uploads/2010/3/aext/17.gif" alt="" width="510" height="259" /></a></div>
<p>Noctis theme is a dark magazine-blog style. This theme is suitable for  blogger who like magazine layout and want to show big post thumbnails in  their homepage.</p>
<hr style="margin-bottom: 35px"/>
<h3 class="item-name"><a href="http://themeforest.net/item/affair/61222?ref=myjilson" target="_blank">Affairv(<span>$</span>22)</a></h3>
<div class="bigimage"><a href="http://themeforest.net/item/affair/full_screen_preview/61222?ref=myjilson" target="_blank"><img class="alignnone" src="http://smashingwebs.com/wp-content/uploads/2010/3/aext/18.gif" alt="" width="510" height="259" /></a></div>
<p>It is a 2  column, magazine flavoured WordPress theme, designed to put your  content at the forefront and give your blog a modern, stylish and  professional feel. Featuring automatic thumbnail generation and custom  social media links.</p>
<hr style="margin-bottom: 35px"/>
<h3 class="item-name"><a href="http://themeforest.net/item/caulk/76108?ref=myjilson" target="_blank">Caulk(<span>$</span>27)</a></h3>
<div class="bigimage"><a href="http://themeforest.net/item/caulk/full_screen_preview/76108?ref=myjilson" target="_blank"><img class="alignnone" src="http://smashingwebs.com/wp-content/uploads/2010/3/aext/19.gif" alt="" width="510" height="259" /></a></div>
<p>Caulk is a modern, sleek WordPress custom theme built especially for  magazine-style blogs, but also customizable for personal use, making use  of multiple jQuery sliders. It is clean, organized, and easy to read  with plenty of white space and nice typography.</p>
<hr style="margin-bottom: 35px"/>
<h3 class="item-name"><a href="http://themeforest.net/item/majalah/79249?ref=myjilson" target="_blank">MAJALAH (<span>$</span>27)</a></h3>
<div class="bigimage"><a href="http://themeforest.net/item/majalah/full_screen_preview/79249?ref=myjilson" target="_blank"><img class="alignnone" src="http://smashingwebs.com/wp-content/uploads/2010/3/aext/20.gif" alt="" width="510" height="259" /></a></div>
<p>MAJALAH  is magazine style WordPress theme with clean and modern layout,  and also can be switched as community theme. There are 2 Slideshow  options in  MAJALAH  theme, 3D slideshow and Javascript slideshow that  easily configurable from admin theme options, and also 2 colors  available in dark dan white color with 4 combination background.</p>
<hr style="margin-bottom: 35px"/>
<h3 class="item-name"><a href="http://www.woothemes.com/amember/go.php?r=22603&amp;i=l22" target="_blank">BusyBee</a></h3>
<div class="bigimage"><a href="http://www.woothemes.com/amember/go.php?r=22603&amp;i=l22" target="_blank"><img class="alignnone" src="http://smashingwebs.com/wp-content/uploads/2010/3/aext/26.gif" alt="" width="510" height="259" /></a></div>
<p>Clean and efficient wordpress theme from the wootheme sets. You can directly go and setup what all you needed in this page. You can customize this theme. I really liked this theme very much.</p>
<hr style="margin-bottom: 35px"/>
<h3 class="item-name"><a href="http://themeforest.net/item/convergence-community-wordpress-theme/34924?ref=myjilson" target="_blank">Convergence &#8211; Community WordPress Theme(<span>$</span>27)</a></h3>
<div class="bigimage"><a href="http://themeforest.net/item/convergence-community-wordpress-theme/full_screen_preview/34924?ref=myjilson" target="_blank"><img class="alignnone" src="http://smashingwebs.com/wp-content/uploads/2010/3/aext/29.gif" alt="" width="510" height="259" /></a></div>
<p>Convergence is a nicely put together WordPress theme with the intent  and focus on creating a community site. This theme includes many popular  features seen in todayâ€™s industry leading community sites.</p>
<p>If youâ€™ve ever thought about starting a community based site, then  this is your theme. Purchase today and be up and running in no time at  all.</p>
<hr style="margin-bottom: 35px"/>
<h3 class="item-name"><a href="http://themeforest.net/item/intersect-wordpress-theme/86535?ref=myjilson" target="_blank">Intersect &#8211; WordPress Theme(<span>$</span>27)</a></h3>
<div class="bigimage"><a href="http://themeforest.net/item/intersect-wordpress-theme/full_screen_preview/86535?ref=myjilson" target="_blank"><img class="alignnone" src="http://smashingwebs.com/wp-content/uploads/2010/3/aext/30.gif" alt="" width="510" height="259" /></a></div>
<p>Intersect is a bold, striking WordPress theme with various layouts,  colors and easy to setup. This theme is ready to get a site up an  running out of the box. It is easy to customize and is configured for  fast skinning.</p>
<p>Includes 8 different skins, each with a unique custom background. The   PSD  files includes a backgrounds file allowing you to create your own  combination of any color with any background, or make your own in  minutes.</p>
<hr style="margin-bottom: 35px"/>
<h3 class="item-name"><a href="http://themeforest.net/item/my-wordpress/39678?ref=myjilson" target="_blank">My WordPress (<span>$</span>27)</a></h3>
<div class="bigimage"><a href="http://themeforest.net/item/my-wordpress/full_screen_preview/39678?ref=myjilson" target="_blank"><img class="alignnone" src="http://smashingwebs.com/wp-content/uploads/2010/3/aext/31.gif" alt="" width="510" height="259" /></a></div>
<p>My WordPress is a professional WordPress theme with the intent and focus  on creating a community site. It is widget ready, print ready,  page-navi ready, ad optimization ready,  SEO  friendly, smooth tabbing  and dropdown using jquery, breadcumb integrated and many more!</p>
<hr style="margin-bottom: 35px"/>
<h3 class="item-name"><a href="http://themeforest.net/item/marketplace-community-wordpress-theme/68073?ref=myjilson" target="_blank">Marketplace Community WordPress Theme (<span>$</span>27)</a></h3>
<div class="bigimage"><a href="http://themeforest.net/item/marketplace-community-wordpress-theme/full_screen_preview/68073?ref=myjilson" target="_blank"><img class="alignnone" src="http://smashingwebs.com/wp-content/uploads/2010/3/aext/34.gif" alt="" width="510" height="259" /></a></div>
<p>Marketplace is a both clean and stylish WordPress theme with the intent  and focus on creating a community site for industry news, tutorials,  etc. This theme includes many popular built in features seen in todayâ€™s  industry leading community sites. This themes comes with 5 different  color options to choose from.</p>
<hr style="margin-bottom: 35px"/>
<h3 class="item-name"><a href="http://themeforest.net/item/sharp/21861?ref=myjilson" target="_blank">Sharp(<span>$</span>27)</a></h3>
<div class="bigimage"><a href="http://themeforest.net/item/sharp/full_screen_preview/21861?ref=myjilson" target="_blank"><img class="alignnone" src="http://smashingwebs.com/wp-content/uploads/2010/3/aext/35.gif" alt="" width="510" height="259" /></a></div>
<p>The Sharp theme is a widget ready clean, crisp WordPress blog layout  with 4 color variations that is easy to customize and use.</p>
<p>Template features:</p>
<ul>
<li>WordPress 2.6 &amp; 2.7 Theme</li>
<li>Easy logo change</li>
<li>Sidebar Widget Ready</li>
<li>Valid  CSS  and  XHTML 1 .0 strict</li>
<li>2 columns tableless fixed layout</li>
<li>4  PSD  files</li>
<li>Easy customization</li>
</ul>
<hr style="margin-bottom: 35px"/>
<h3 class="item-name"><a href="http://themeforest.net/item/wooituts-advanced-community-theme/full_screen_preview/57718?ref=myjilson" target="_blank">WooiTuts &#8211; Advanced community theme(<span>$</span>32)</a></h3>
<div class="bigimage"><a href="http://themeforest.net/item/wooituts-advanced-community-theme/full_screen_preview/57718?ref=myjilson" target="_blank"><img class="alignnone" src="http://smashingwebs.com/wp-content/uploads/2010/3/aext/36.gif" alt="" width="510" height="259" /></a></div>
<p>WooiTuts is an advanced WordPress theme for all of those ever wanted to  create a cool Communtiy site, like an Tutorial blog, Tech blog or  whatever type of blog you want to setup you can do it with WooiTuts.</p>
<hr style="margin-bottom: 35px"/>
<h3 class="item-name"><a href="http://themeforest.net/item/evolutionary-theme/60414?ref=myjilson" target="_blank">Evolutionary Theme (<span>$</span>27)</a></h3>
<div class="bigimage"><a href="http://themeforest.net/item/evolutionary-theme/full_screen_preview/60414?ref=myjilson" target="_blank"><img class="alignnone" src="http://smashingwebs.com/wp-content/uploads/2010/3/aext/37.gif" alt="" width="510" height="259" /></a></div>
<p>Evolutionary is a clean, jQuery animated WordPress theme.</p>
<p>Features include:</p>
<ul>
<li>Four Color Schemes: Blue (default), Green, Red, Black (inverse)</li>
<li>Featured Posts section: No plugins required.</li>
<li>jQuery animations in navigation and sidebar</li>
<li>Widget Ready Sidebar and Footer</li>
<li>Featured Posts, Color Scheme, Copyright, and moreÂ <strong> </strong></li>
</ul>
<hr style="margin-bottom: 35px"/>
<h3 class="item-name"><a href="http://themeforest.net/item/-intersect-html-template-8-in-1-skins/77440?ref=myjilson" target="_blank">Intersect &#8211; HTML Template (8 in 1 skins) (<span>$</span>17)</a></h3>
<div class="bigimage"><a href="http://themeforest.net/item/-intersect-html-template-8-in-1-skins/full_screen_preview/77440?ref=myjilson" target="_blank"><img class="alignnone" src="http://smashingwebs.com/wp-content/uploads/2010/3/aext/38.gif" alt="" width="510" height="259" /></a></div>
<p>Intersect is a bold, striking html template with various layouts, colors  and easy for modification. This theme is ready to get a site up an  running out of the box. It is easy to customize and is configured for  easy skinning.</p>
<hr style="margin-bottom: 35px"/>
<h3 class="item-name"><a href="http://themeforest.net/item/post-it/55417?ref=myjilson" target="_blank">Post It (<span>$</span>22)</a></h3>
<div class="bigimage"><a href="http://themeforest.net/item/post-it/full_screen_preview/55417?ref=myjilson" target="_blank"><img class="alignnone" src="http://smashingwebs.com/wp-content/uploads/2010/3/aext/39.gif" alt="" width="510" height="259" /></a></div>
<p><strong>Post It</strong> is a WordPress Theme designed for all  creative bloggers</p>
<p><strong>Theme Features</strong></p>
<ul>
<li><strong>4 characters / skins</strong> to choose from</li>
<li>960 Grid System</li>
<li>Easy customization with theme options page</li>
<li> RSS   feed design integrated in header illustration</li>
<li>Built-in 125Ã—125 banner ads (managable in theme options)</li>
<li>Widget ready</li>
</ul>
<hr style="margin-bottom: 35px"/>
<h3 class="item-name"><a href="http://themeforest.net/item/filthy/58929?ref=myjilson" target="_blank">Filthy (<span>$</span>32)</a></h3>
<div class="bigimage"><a href="http://themeforest.net/item/filthy/full_screen_preview/58929?ref=myjilson" target="_blank"><img class="alignnone" src="http://smashingwebs.com/wp-content/uploads/2010/3/aext/40.gif" alt="" width="510" height="259" /></a></div>
<p><strong>Filthy</strong> is a personal blog theme thatâ€™s been through the  ringer. This thing is just down right dirty! And best of all, it comes  it 2 shades of filth â€“ brown and black.</p>
]]></content:encoded>
			<wfw:commentRss>http://aext.net/2010/03/most-wanted-businessmagazine-wordpress-premium-themes/feed/</wfw:commentRss>
		<slash:comments>29</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>
	</channel>
</rss>

