<?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>Cozmoslabs &#187; Thematic</title>
	<atom:link href="http://www.cozmoslabs.com/category/thematic/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cozmoslabs.com</link>
	<description>Web design and development experiment.</description>
	<lastBuildDate>Thu, 01 Jul 2010 09:26:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>WordPress user registration template and custom user profile fields</title>
		<link>http://www.cozmoslabs.com/2010/05/31/wordpress-user-registration-template-and-custom-user-profile-fields/</link>
		<comments>http://www.cozmoslabs.com/2010/05/31/wordpress-user-registration-template-and-custom-user-profile-fields/#comments</comments>
		<pubDate>Mon, 31 May 2010 12:14:19 +0000</pubDate>
		<dc:creator>Cristian</dc:creator>
				<category><![CDATA[Recomended Reading]]></category>
		<category><![CDATA[Thematic]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[custom user profiles]]></category>
		<category><![CDATA[frontend user registration]]></category>

		<guid isPermaLink="false">http://www.cozmoslabs.com/?p=1012</guid>
		<description><![CDATA[I&#8217;ve been playing a lot lately with the user registration template (I&#8217;ve used it as a great starting point) from Justin Tadlock&#8217;s ThemeHybrid and extended it to support custom user profiles. Unfortunately, user management in WordPress isn&#8217;t the sharpest tool in the shed. You have a lot of functionality for the users in the backend, [...]


Related posts:<ol><li><a href='http://www.cozmoslabs.com/2008/08/11/10-design-tips-for-your-custom-wordpress-theme-built-with-thematic/' rel='bookmark' title='Permanent Link: 10 design tips for your custom wordpress theme built with thematic'>10 design tips for your custom wordpress theme built with thematic</a></li>
<li><a href='http://www.cozmoslabs.com/2009/06/16/wordpress-as-a-social-platform/' rel='bookmark' title='Permanent Link: WordPress as a social platform'>WordPress as a social platform</a></li>
<li><a href='http://www.cozmoslabs.com/2009/07/20/early-morning-child-theme/' rel='bookmark' title='Permanent Link: Early Morning Child Theme'>Early Morning Child Theme</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.cozmoslabs.com/wp-content/uploads/2010/05/ostrich.jpg" alt="" title="ostrich" width="300" height="200" class="alignright size-full wp-image-1036" /></p>
<p>I&#8217;ve been playing a lot lately with the <strong>user registration template</strong> (I&#8217;ve used it as a great starting point) from Justin Tadlock&#8217;s <a href="http://themehybrid.com/archives/2010/01/12-new-hybrid-theme-page-templates">ThemeHybrid</a> and extended it to support <strong>custom user profiles</strong>.</p>
<p>Unfortunately, user management in WordPress isn&#8217;t the sharpest tool in the shed. You have a lot of functionality for the users in the backend, but if you want to do extend that functionality to the front-end you&#8217;re in for a rough time.</p>
<p>There are some really nice tutorials that can help you add custom user profile fields in the backend, but if you try to do it to the frontend through a custom page template you&#8217;ll find your self validating a lot of fields and there&#8217;s even a twist to the entire process that makes things interesting.</p>
<p><span id="more-1012"></span></p>
<div class="preview_download">
<a href="http://cozmoslabs.com/project/thematic-frontend-profile/"><img src="http://www.cozmoslabs.com/wp-content/uploads/2009/07/preview.gif" alt="preview"/></a><a class="downloadlink dlimg" href="http://www.cozmoslabs.com/wp-content/plugins/download-monitor/download.php?id=11" title="Version 1.0 downloaded 337 times" ><img src="http://www.cozmoslabs.com/wp-content/plugins/download-monitor/img/download.gif" alt="Download Thematic Frontend Profile Version 1.0" /></a>
</div>
<h3>Yet Another Thematic Childtheme</h3>
<p>For the purpose of this tutorial will create a new <a href="http://themeshaper.com/thematic/">Thematic</a> child theme. Most of the code will go into the functions.php file and the individual template pages. If you&#8217;re new to this just use the child theme that comes with Thematic.</p>
<p>So let us have a look at what we&#8217;re building.</p>
<h3>WordPress Extra Profile Fields</h3>
<p>First of all, we want <strong>some extra profile fields in the back-end</strong>. We do this by simply adding input fields to the following two hooks: <code>show_user_profile</code> and <code>edit_user_profile</code>. We need both hooks because we want the users to be able to edit their own extra profile fields <em>and</em> we also want the admin to be able to edit other user&#8217;s extra profile fields.</p>

<div class="wp_codebox"><table><tr id="p101211"><td class="code" id="p1012code11"><pre class="php" style="font-family:monospace;">add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'show_user_profile'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'show_extra_profile_fields'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'edit_user_profile'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'show_extra_profile_fields'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> show_extra_profile_fields<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$user</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	<span style="color: #339933;">&lt;</span>input type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;twitter&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php echo esc_attr( get_the_author_meta( 'twitter', <span style="color: #006699; font-weight: bold;">$user-&gt;ID</span> ) ); ?&gt;&quot;</span> <span style="color: #339933;">/&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>In addition to this, we also need to save our data. This is done by hooking to <code>personal_options_update</code> and <code>edit_user_profile_update</code>. Both hooks are needed for the same reason two hooks were needed when adding the extra input fields.</p>

<div class="wp_codebox"><table><tr id="p101212"><td class="code" id="p1012code12"><pre class="php" style="font-family:monospace;">add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'personal_options_update'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'save_extra_profile_fields'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'edit_user_profile_update'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'save_extra_profile_fields'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> save_extra_profile_fields<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$user_id</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span>current_user_can<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'edit_user'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$user_id</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
	update_usermeta<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$user_id</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'twitter'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'twitter'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>This is what your entire functions.php file should contain:</p>

<div class="wp_codebox"><table><tr id="p101213"><td class="code" id="p1012code13"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//</span>
<span style="color: #666666; font-style: italic;">//  Custom Child Theme Functions</span>
<span style="color: #666666; font-style: italic;">//</span>
&nbsp;
&nbsp;
add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'show_user_profile'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'show_extra_profile_fields'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'edit_user_profile'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'show_extra_profile_fields'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> show_extra_profile_fields<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$user</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
	<span style="color: #339933;">&lt;</span>h3<span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Extra Profile Information'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>h3<span style="color: #339933;">&gt;</span>
&nbsp;
	<span style="color: #339933;">&lt;</span>table <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-table&quot;</span><span style="color: #339933;">&gt;</span>
&nbsp;
		<span style="color: #339933;">&lt;</span>tr<span style="color: #339933;">&gt;</span>
			<span style="color: #339933;">&lt;</span>th<span style="color: #339933;">&gt;&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;twitter&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Twitter'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;&lt;/</span>th<span style="color: #339933;">&gt;</span>
&nbsp;
			<span style="color: #339933;">&lt;</span>td<span style="color: #339933;">&gt;</span>
				<span style="color: #339933;">&lt;</span>input type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;twitter&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;twitter&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php echo esc_attr( get_the_author_meta( 'twitter', <span style="color: #006699; font-weight: bold;">$user-&gt;ID</span> ) ); ?&gt;&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;regular-text&quot;</span> <span style="color: #339933;">/&gt;&lt;</span>br <span style="color: #339933;">/&gt;</span>
				<span style="color: #339933;">&lt;</span>span <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;description&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Please enter your Twitter account.'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>span<span style="color: #339933;">&gt;</span>
			<span style="color: #339933;">&lt;/</span>td<span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;/</span>tr<span style="color: #339933;">&gt;</span>
&nbsp;
		<span style="color: #339933;">&lt;</span>tr<span style="color: #339933;">&gt;</span>
			<span style="color: #339933;">&lt;</span>th<span style="color: #339933;">&gt;&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;birth&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Year of birth'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;&lt;/</span>th<span style="color: #339933;">&gt;</span>
&nbsp;
			<span style="color: #339933;">&lt;</span>td<span style="color: #339933;">&gt;</span>
				<span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
				<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">1900</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">&lt;=</span><span style="color: #cc66cc;">2000</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
					<span style="color: #000088;">$years</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">=</span><span style="color: #000088;">$i</span><span style="color: #339933;">;</span>
&nbsp;
				<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;select name=&quot;birth&quot;&gt;'</span><span style="color: #339933;">;</span>
					<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;option value=&quot;&quot;&gt;'</span> <span style="color: #339933;">.</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Select Year&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;/option&gt;'</span><span style="color: #339933;">;</span>
					<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$years</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$year</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
						<span style="color: #000088;">$selected</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
						<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$year</span> <span style="color: #339933;">==</span> get_the_author_meta<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'birth'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
							<span style="color: #000088;">$selected</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'selected=&quot;slelected&quot;'</span><span style="color: #339933;">;</span>
						<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;option value=&quot;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$year</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot; '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$selected</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$year</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;/option&gt;'</span><span style="color: #339933;">;</span>
					<span style="color: #009900;">&#125;</span>
				<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;/select&gt;'</span><span style="color: #339933;">;</span>
				<span style="color: #000000; font-weight: bold;">?&gt;</span>
				<span style="color: #339933;">&lt;</span>span <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;description&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Please select the year of your birth.'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>span<span style="color: #339933;">&gt;</span>
			<span style="color: #339933;">&lt;/</span>td<span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;/</span>tr<span style="color: #339933;">&gt;</span>
&nbsp;
		<span style="color: #339933;">&lt;</span>tr<span style="color: #339933;">&gt;</span>
			<span style="color: #339933;">&lt;</span>th<span style="color: #339933;">&gt;&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;hobbies&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'What are your hobbies?'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;&lt;/</span>th<span style="color: #339933;">&gt;</span>
			<span style="color: #339933;">&lt;</span>td<span style="color: #339933;">&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$hobbies</span> <span style="color: #339933;">=</span> get_the_author_meta<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'hobbies'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
				<span style="color: #339933;">&lt;</span>ul<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>input value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;videogames&quot;</span>           name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;hobbies[]&quot;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/is_array"><span style="color: #990000;">is_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$hobbies</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/in_array"><span style="color: #990000;">in_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;videogames&quot;</span><span style="color: #339933;">,</span>           <span style="color: #000088;">$hobbies</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>checked<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checked&quot;</span><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">?&gt;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checkbox&quot;</span> <span style="color: #339933;">/&gt;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Video Games'</span><span style="color: #339933;">,</span>           <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>li<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>input value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;sabotagingcapitalism&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;hobbies[]&quot;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/is_array"><span style="color: #990000;">is_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$hobbies</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/in_array"><span style="color: #990000;">in_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;sabotagingcapitalism&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$hobbies</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>checked<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checked&quot;</span><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">?&gt;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checkbox&quot;</span> <span style="color: #339933;">/&gt;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Sabotaging Capitalism'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>li<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>input value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;watchingtv&quot;</span>           name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;hobbies[]&quot;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/is_array"><span style="color: #990000;">is_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$hobbies</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/in_array"><span style="color: #990000;">in_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;watchingtv&quot;</span><span style="color: #339933;">,</span>           <span style="color: #000088;">$hobbies</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>checked<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checked&quot;</span><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">?&gt;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checkbox&quot;</span> <span style="color: #339933;">/&gt;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Watching TV'</span><span style="color: #339933;">,</span>           <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>li<span style="color: #339933;">&gt;</span>
				<span style="color: #339933;">&lt;/</span>ul<span style="color: #339933;">&gt;</span>
			<span style="color: #339933;">&lt;/</span>td<span style="color: #339933;">&gt;</span>			
		<span style="color: #339933;">&lt;/</span>tr<span style="color: #339933;">&gt;</span>
&nbsp;
		<span style="color: #339933;">&lt;</span>tr<span style="color: #339933;">&gt;</span>
			<span style="color: #339933;">&lt;</span>th<span style="color: #339933;">&gt;&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;agree&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Do you agree that WordPress is the greatest thing since bread came sliced?'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;&lt;/</span>th<span style="color: #339933;">&gt;</span>
			<span style="color: #339933;">&lt;</span>td<span style="color: #339933;">&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$agree</span> <span style="color: #339933;">=</span> get_the_author_meta<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'agree'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
				<span style="color: #339933;">&lt;</span>ul<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>input value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;yes&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;agree&quot;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$agree</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'yes'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>checked<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checked&quot;</span><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">?&gt;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;radio&quot;</span> <span style="color: #339933;">/&gt;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Yes'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>li<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>input value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;no&quot;</span>  name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;agree&quot;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$agree</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'no'</span>  <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>checked<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checked&quot;</span><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">?&gt;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;radio&quot;</span> <span style="color: #339933;">/&gt;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'No'</span><span style="color: #339933;">,</span>  <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>li<span style="color: #339933;">&gt;</span>
				<span style="color: #339933;">&lt;/</span>ul<span style="color: #339933;">&gt;</span>
			<span style="color: #339933;">&lt;/</span>td<span style="color: #339933;">&gt;</span>			
		<span style="color: #339933;">&lt;/</span>tr<span style="color: #339933;">&gt;</span>
&nbsp;
	<span style="color: #339933;">&lt;/</span>table<span style="color: #339933;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span>
&nbsp;
add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'personal_options_update'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'save_extra_profile_fields'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'edit_user_profile_update'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'save_extra_profile_fields'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> save_extra_profile_fields<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$user_id</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span>current_user_can<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'edit_user'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$user_id</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
&nbsp;
	update_usermeta<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$user_id</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'twitter'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'twitter'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	update_usermeta<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$user_id</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'birth'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'birth'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	update_usermeta<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$user_id</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'hobbies'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'hobbies'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	update_usermeta<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$user_id</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'agree'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'agree'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<h3>The templates</h3>
<h4>Edit Profile Template</h4>
<p>All right. With this out of the way, we can start working on our awesome templates. Let&#8217;s start with the <strong>Edit Profile Template</strong>. First of all, we need a form with all the input fields (both the default ones and our extra fields).</p>

<div class="wp_codebox"><table><tr id="p101214"><td class="code" id="p1012code14"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>form method<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;post&quot;</span> action<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php the_permalink(); ?&gt;&quot;</span><span style="color: #339933;">&gt;</span>
&nbsp;
	<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-twitter&quot;</span><span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;twitter&quot;</span><span style="color: #339933;">&gt;</span>Twitter<span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;</span>input name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;twitter&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php the_author_meta( 'twitter', <span style="color: #006699; font-weight: bold;">$current_user-&gt;id</span> ); ?&gt;&quot;</span> <span style="color: #339933;">/&gt;</span>
	<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>twitter <span style="color: #339933;">--&gt;</span>
&nbsp;
	<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-submit&quot;</span><span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;</span>input name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;updateuser&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;submit&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;updateuser&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;submit button&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Update&quot;</span> <span style="color: #339933;">/&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_nonce_field<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'update-user'</span> <span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
		<span style="color: #339933;">&lt;</span>input name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;action&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;hidden&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;action&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;update-user&quot;</span> <span style="color: #339933;">/&gt;</span>
	<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>submit <span style="color: #339933;">--&gt;</span>
&nbsp;
<span style="color: #339933;">&lt;/</span>form<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>Then, we need to update the user meta-data accordingly when needed. All can be summed up to the following snippet:</p>

<div class="wp_codebox"><table><tr id="p101215"><td class="code" id="p1012code15"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #666666; font-style: italic;">/* Get user info. */</span>
	<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">;</span>
	get_currentuserinfo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">/* Load the registration file. */</span>
	<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span> ABSPATH <span style="color: #339933;">.</span> WPINC <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/registration.php'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">/* If profile was saved, update profile. */</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'POST'</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REQUEST_METHOD'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><a href="http://www.php.net/empty"><span style="color: #990000;">empty</span></a><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'action'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'action'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'update-user'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		update_usermeta<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'twitter'</span><span style="color: #339933;">,</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'twitter'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
	<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Notice that loading the registration file found in <code>wp-includes</code> is an absolute must.</p>
<p><strong>Here is the entire edit profile page template for your Thematic Child Theme.</strong></p>

<div class="wp_codebox"><table><tr id="p101216"><td class="code" id="p1012code16"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009933; font-style: italic;">/**
 * Template Name: Edit Profile Page
 *
 */</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">/* Get user info. */</span>
	<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">,</span> <span style="color: #000088;">$wp_roles</span><span style="color: #339933;">;</span>
	get_currentuserinfo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">/* Load the registration file. */</span>
	<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span> ABSPATH <span style="color: #339933;">.</span> WPINC <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/registration.php'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span> ABSPATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">'wp-admin/includes'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/template.php'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// this is only for the selected() function</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">/* If profile was saved, update profile. */</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'POST'</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REQUEST_METHOD'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><a href="http://www.php.net/empty"><span style="color: #990000;">empty</span></a><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'action'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'action'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'update-user'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">/* Update user password. */</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><a href="http://www.php.net/empty"><span style="color: #990000;">empty</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'pass1'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><a href="http://www.php.net/empty"><span style="color: #990000;">empty</span></a><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'pass2'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'pass1'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'pass2'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span>
				wp_update_user<span style="color: #009900;">&#40;</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'ID'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'user_pass'</span> <span style="color: #339933;">=&gt;</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'pass1'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">else</span>
				<span style="color: #000088;">$error</span> <span style="color: #339933;">=</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'The passwords you entered do not match.  Your password was not updated.'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">/* Update user information. */</span>
&nbsp;
		update_usermeta<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'first_name'</span><span style="color: #339933;">,</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'first_name'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		update_usermeta<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'last_name'</span><span style="color: #339933;">,</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'last_name'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><a href="http://www.php.net/empty"><span style="color: #990000;">empty</span></a><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'nickname'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
			update_usermeta<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'nickname'</span><span style="color: #339933;">,</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'nickname'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		update_usermeta<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'display_name'</span><span style="color: #339933;">,</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'display_name'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><a href="http://www.php.net/empty"><span style="color: #990000;">empty</span></a><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'email'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
			update_usermeta<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'user_email'</span><span style="color: #339933;">,</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'email'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/strpos"><span style="color: #990000;">strpos</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'website'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'ttp://'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <a href="http://www.php.net/empty"><span style="color: #990000;">empty</span></a><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'website'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
			update_usermeta<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'user_url'</span><span style="color: #339933;">,</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'website'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">else</span>
			update_usermeta<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'user_url'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'http://'</span> <span style="color: #339933;">.</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'website'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		update_usermeta<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'aim'</span><span style="color: #339933;">,</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'aim'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		update_usermeta<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'yim'</span><span style="color: #339933;">,</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'yim'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		update_usermeta<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'jabber'</span><span style="color: #339933;">,</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'jabber'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		update_usermeta<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'description'</span><span style="color: #339933;">,</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'description'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// Extra Profile Information</span>
&nbsp;
		update_usermeta<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'twitter'</span><span style="color: #339933;">,</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'twitter'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
&nbsp;
		update_usermeta<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'birth'</span><span style="color: #339933;">,</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'birth'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
&nbsp;
		update_usermeta<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'hobbies'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'hobbies'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
&nbsp;
		update_usermeta<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'agree'</span><span style="color: #339933;">,</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'agree'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
&nbsp;
		<span style="color: #666666; font-style: italic;">/* Redirect so the page will show updated info. */</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #000088;">$error</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			wp_redirect<span style="color: #009900;">&#40;</span> get_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<a href="http://www.php.net/exit"><span style="color: #990000;">exit</span></a><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// calling the header.php</span>
    get_header<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// action hook for placing content above #container</span>
    thematic_abovecontainer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
	<span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;container&quot;</span><span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;content&quot;</span><span style="color: #339933;">&gt;</span>
&nbsp;
            <span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
            <span style="color: #666666; font-style: italic;">// calling the widget area 'page-top'</span>
            get_sidebar<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'page-top'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            the_post<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
			<span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;post-&lt;?php the_ID(); ?&gt;&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php thematic_post_class() ?&gt;&quot;</span><span style="color: #339933;">&gt;</span>
&nbsp;
                <span style="color: #000000; font-weight: bold;">&lt;?php</span> 
&nbsp;
                <span style="color: #666666; font-style: italic;">// creating the post header</span>
                thematic_postheader<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>div <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;entry-content&quot;</span><span style="color: #339933;">&gt;</span>
&nbsp;
                    <span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
                    the_content<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                    wp_link_pages<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span>&lt;div class='page-link'&gt;&quot;</span><span style="color: #339933;">.</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Pages: '</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'thematic'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&lt;/div&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'number'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                    edit_post_link<span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Edit'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'thematic'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'&lt;span class=&quot;edit-link&quot;&gt;'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'&lt;/span&gt;'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span>
			<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>post <span style="color: #339933;">--&gt;</span>
&nbsp;
<span style="color: #339933;">&lt;!--</span> EDIT PROFILE STARTS HERE <span style="color: #339933;">--&gt;</span>
&nbsp;
			<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span>is_user_logged_in<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;warning&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'You must be logged in to edit your profile.'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>warning <span style="color: #339933;">--&gt;</span>
&nbsp;
			<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
				<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$error</span> <span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;p class=&quot;error&quot;&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$error</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;/p&gt;'</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>form method<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;post&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;edituser&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;user-forms&quot;</span> action<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php the_permalink(); ?&gt;&quot;</span><span style="color: #339933;">&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>strong<span style="color: #339933;">&gt;</span>Name<span style="color: #339933;">&lt;/</span>strong<span style="color: #339933;">&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;first_name&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;first_name&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'First Name'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>input <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text-input&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;first_name&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;first_name&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php the_author_meta( 'first_name', <span style="color: #006699; font-weight: bold;">$current_user-&gt;id</span> ); ?&gt;&quot;</span> <span style="color: #339933;">/&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>first_name <span style="color: #339933;">--&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;last_name&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;last_name&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Last Name'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>input <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text-input&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;last_name&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;last_name&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php the_author_meta( 'last_name', <span style="color: #006699; font-weight: bold;">$current_user-&gt;id</span> ); ?&gt;&quot;</span> <span style="color: #339933;">/&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>last_name <span style="color: #339933;">--&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;nickname&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;nickname&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Nickname (required)'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>input <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text-input&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;nickname&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;nickname&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php the_author_meta( 'nickname', <span style="color: #006699; font-weight: bold;">$current_user-&gt;id</span> ); ?&gt;&quot;</span> <span style="color: #339933;">/&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>nickname <span style="color: #339933;">--&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;display_name&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;display_name&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Display Name'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>select name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;display_name&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;display_name&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #000000; font-weight: bold;">&lt;?php</span>
						<span style="color: #000088;">$public_display</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
						<span style="color: #000088;">$public_display</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'display_nickname'</span><span style="color: #009900;">&#93;</span>  <span style="color: #339933;">=</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nickname</span><span style="color: #339933;">;</span>
						<span style="color: #000088;">$public_display</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'display_username'</span><span style="color: #009900;">&#93;</span>  <span style="color: #339933;">=</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">user_login</span><span style="color: #339933;">;</span>
						<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><a href="http://www.php.net/empty"><span style="color: #990000;">empty</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">first_name</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
							<span style="color: #000088;">$public_display</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'display_firstname'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">first_name</span><span style="color: #339933;">;</span>
						<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><a href="http://www.php.net/empty"><span style="color: #990000;">empty</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">last_name</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
							<span style="color: #000088;">$public_display</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'display_lastname'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">last_name</span><span style="color: #339933;">;</span>
						<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><a href="http://www.php.net/empty"><span style="color: #990000;">empty</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">first_name</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><a href="http://www.php.net/empty"><span style="color: #990000;">empty</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">last_name</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
							<span style="color: #000088;">$public_display</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'display_firstlast'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">first_name</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">last_name</span><span style="color: #339933;">;</span>
							<span style="color: #000088;">$public_display</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'display_lastfirst'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">last_name</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">first_name</span><span style="color: #339933;">;</span>
						<span style="color: #009900;">&#125;</span>
						<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><a href="http://www.php.net/in_array"><span style="color: #990000;">in_array</span></a><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">display_name</span><span style="color: #339933;">,</span> <span style="color: #000088;">$public_display</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #666666; font-style: italic;">// Only add this if it isn't duplicated elsewhere</span>
							<span style="color: #000088;">$public_display</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'display_displayname'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">display_name</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$public_display</span><span style="color: #339933;">;</span>
						<span style="color: #000088;">$public_display</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array_map"><span style="color: #990000;">array_map</span></a><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'trim'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$public_display</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
						<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$public_display</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$id</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$item</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
					<span style="color: #000000; font-weight: bold;">?&gt;</span>
						<span style="color: #339933;">&lt;</span>option id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php echo <span style="color: #006699; font-weight: bold;">$id</span>; ?&gt;&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php echo esc_attr(<span style="color: #006699; font-weight: bold;">$item</span>); ?&gt;&quot;</span><span style="color: #000000; font-weight: bold;">&lt;?php</span> selected<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">display_name</span><span style="color: #339933;">,</span> <span style="color: #000088;">$item</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$item</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
					<span style="color: #000000; font-weight: bold;">&lt;?php</span>
						<span style="color: #009900;">&#125;</span>
					<span style="color: #000000; font-weight: bold;">?&gt;</span>
					<span style="color: #339933;">&lt;/</span>select<span style="color: #339933;">&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>display_name <span style="color: #339933;">--&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>strong<span style="color: #339933;">&gt;</span>Contact Info<span style="color: #339933;">&lt;/</span>strong<span style="color: #339933;">&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-email&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;email&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'E-mail (required)'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>input <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text-input&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;email&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;email&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php the_author_meta( 'user_email', <span style="color: #006699; font-weight: bold;">$current_user-&gt;id</span> ); ?&gt;&quot;</span> <span style="color: #339933;">/&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>email <span style="color: #339933;">--&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-website&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;website&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Website'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>input <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text-input&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;website&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;website&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php the_author_meta( 'user_url', <span style="color: #006699; font-weight: bold;">$current_user-&gt;id</span> ); ?&gt;&quot;</span> <span style="color: #339933;">/&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>website <span style="color: #339933;">--&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-aim&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;aim&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'AIM'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>input <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text-input&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;aim&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;aim&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php the_author_meta( 'aim', <span style="color: #006699; font-weight: bold;">$current_user-&gt;id</span> ); ?&gt;&quot;</span> <span style="color: #339933;">/&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>aim <span style="color: #339933;">--&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-yim&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;yim&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Yahoo IM'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>input <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text-input&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;yim&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;yim&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php the_author_meta( 'yim', <span style="color: #006699; font-weight: bold;">$current_user-&gt;id</span> ); ?&gt;&quot;</span> <span style="color: #339933;">/&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>yim <span style="color: #339933;">--&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-jabber&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;jabber&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Jabber / Google Talk'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>input <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text-input&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;jabber&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;jabber&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php the_author_meta( 'jabber', <span style="color: #006699; font-weight: bold;">$current_user-&gt;id</span> ); ?&gt;&quot;</span> <span style="color: #339933;">/&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>jabber <span style="color: #339933;">--&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>strong<span style="color: #339933;">&gt;</span>About Yourself<span style="color: #339933;">&lt;/</span>strong<span style="color: #339933;">&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-description&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;description&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Biographical Info'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>textarea <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text-input&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;description&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;description&quot;</span> rows<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;5&quot;</span> cols<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;30&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php <span style="color: #b1b100;">echo</span> the_author_meta<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'description'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>textarea<span style="color: #339933;">&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>description <span style="color: #339933;">--&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-password&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;pass1&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'New Password'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> <span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>input <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text-input&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;pass1&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;password&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;pass1&quot;</span> <span style="color: #339933;">/&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>password <span style="color: #339933;">--&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-password&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;pass2&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Repeat Password'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>input <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text-input&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;pass2&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;password&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;pass2&quot;</span> <span style="color: #339933;">/&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>password <span style="color: #339933;">--&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>strong<span style="color: #339933;">&gt;</span>Extra Profile Information<span style="color: #339933;">&lt;/</span>strong<span style="color: #339933;">&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-twitter&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;twitter&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Twitter'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>input <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text-input&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;twitter&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;twitter&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php the_author_meta( 'twitter', <span style="color: #006699; font-weight: bold;">$current_user-&gt;id</span> ); ?&gt;&quot;</span> <span style="color: #339933;">/&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>twitter <span style="color: #339933;">--&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-birth&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;birth&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Year of birth'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
					<span style="color: #000000; font-weight: bold;">&lt;?php</span>
						<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">1900</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">&lt;=</span><span style="color: #cc66cc;">2000</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
							<span style="color: #000088;">$years</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">=</span><span style="color: #000088;">$i</span><span style="color: #339933;">;</span>
&nbsp;
						<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;select name=&quot;birth&quot;&gt;'</span><span style="color: #339933;">;</span>
							<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;option value=&quot;&quot;&gt;'</span> <span style="color: #339933;">.</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Select Year&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;/option&gt;'</span><span style="color: #339933;">;</span>
							<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$years</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$year</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
								<span style="color: #000088;">$the_year</span> <span style="color: #339933;">=</span> get_the_author_meta<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'birth'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
								<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$year</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$the_year</span> <span style="color: #009900;">&#41;</span> <span style="color: #000088;">$selected</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'selected=&quot;slelected&quot;'</span><span style="color: #339933;">;</span>
								<span style="color: #b1b100;">else</span> <span style="color: #000088;">$selected</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
								<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;option value=&quot;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$year</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot; '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$selected</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$year</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;/option&gt;'</span><span style="color: #339933;">;</span>
							<span style="color: #009900;">&#125;</span>
						<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;/select&gt;'</span><span style="color: #339933;">;</span>
					<span style="color: #000000; font-weight: bold;">?&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>birth <span style="color: #339933;">--&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-hobbies&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;hobbies&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'What are your hobbies?'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
					<span style="color: #000000; font-weight: bold;">&lt;?php</span>
						<span style="color: #000088;">$hobbies</span> <span style="color: #339933;">=</span> get_the_author_meta<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'hobbies'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					<span style="color: #000000; font-weight: bold;">?&gt;</span>
					<span style="color: #339933;">&lt;</span>ul <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;hobbies-type-list&quot;</span><span style="color: #339933;">&gt;</span>
						<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>input value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;videogames&quot;</span>           name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;hobbies[]&quot;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/is_array"><span style="color: #990000;">is_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$hobbies</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/in_array"><span style="color: #990000;">in_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;videogames&quot;</span><span style="color: #339933;">,</span>           <span style="color: #000088;">$hobbies</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>checked<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checked&quot;</span><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">?&gt;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checkbox&quot;</span> <span style="color: #339933;">/&gt;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Video Games'</span><span style="color: #339933;">,</span>           <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>li<span style="color: #339933;">&gt;</span>
						<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>input value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;sabotagingcapitalism&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;hobbies[]&quot;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/is_array"><span style="color: #990000;">is_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$hobbies</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/in_array"><span style="color: #990000;">in_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;sabotagingcapitalism&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$hobbies</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>checked<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checked&quot;</span><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">?&gt;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checkbox&quot;</span> <span style="color: #339933;">/&gt;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Sabotaging Capitalism'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>li<span style="color: #339933;">&gt;</span>
						<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>input value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;watchingtv&quot;</span>           name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;hobbies[]&quot;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/is_array"><span style="color: #990000;">is_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$hobbies</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/in_array"><span style="color: #990000;">in_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;watchingtv&quot;</span><span style="color: #339933;">,</span>           <span style="color: #000088;">$hobbies</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>checked<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checked&quot;</span><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">?&gt;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checkbox&quot;</span> <span style="color: #339933;">/&gt;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Watching TV'</span><span style="color: #339933;">,</span>           <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>li<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;/</span>ul<span style="color: #339933;">&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>hobbies <span style="color: #339933;">--&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-agree&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;agree&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Do you agree that WordPress is the greatest thing since bread came sliced?'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
					<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$agree</span> <span style="color: #339933;">=</span> get_the_author_meta<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'agree'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
					<span style="color: #339933;">&lt;</span>ul<span style="color: #339933;">&gt;</span>
						<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>input value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;yes&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;agree&quot;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$agree</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'yes'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>checked<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checked&quot;</span><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">?&gt;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;radio&quot;</span> <span style="color: #339933;">/&gt;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Yes'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>li<span style="color: #339933;">&gt;</span>
						<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>input value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;no&quot;</span>  name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;agree&quot;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$agree</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'no'</span>  <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>checked<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checked&quot;</span><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">?&gt;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;radio&quot;</span> <span style="color: #339933;">/&gt;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'No'</span><span style="color: #339933;">,</span>  <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>li<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;/</span>ul<span style="color: #339933;">&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>agree <span style="color: #339933;">--&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-submit&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$referer</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
					<span style="color: #339933;">&lt;</span>input name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;updateuser&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;submit&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;updateuser&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;submit button&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php _e('Update', 'frontendprofile'); ?&gt;&quot;</span> <span style="color: #339933;">/&gt;</span>
					<span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_nonce_field<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'update-user'</span> <span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
					<span style="color: #339933;">&lt;</span>input name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;action&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;hidden&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;action&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;update-user&quot;</span> <span style="color: #339933;">/&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>submit <span style="color: #339933;">--&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;/</span>form<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #666666; font-style: italic;">#edituser --&gt;
</span>
			<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
<span style="color: #339933;">&lt;!--</span> EDIT PROFILE ENDS HERE <span style="color: #339933;">--&gt;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> get_post_custom_values<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'comments'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> 
            thematic_comments_template<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Add a key/value of &quot;comments&quot; to enable comments on pages!</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// calling the widget area 'page-bottom'</span>
        get_sidebar<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'page-bottom'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
		<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #666666; font-style: italic;">#content --&gt;
</span>	<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #666666; font-style: italic;">#container --&gt;
</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> 
&nbsp;
    <span style="color: #666666; font-style: italic;">// action hook for placing content below #container</span>
    thematic_belowcontainer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// calling the standard sidebar </span>
    thematic_sidebar<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// calling footer.php</span>
    get_footer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<h4>User Registration Page Template</h4>
<p>Next, let&#8217;s take a look at the <strong>Register Template</strong>. Similar to the Edit Profile Template, we need a form with all our input fields.</p>

<div class="wp_codebox"><table><tr id="p101217"><td class="code" id="p1012code17"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$error</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;error&quot;</span><span style="color: #339933;">&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$error</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>error <span style="color: #339933;">--&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
<span style="color: #339933;">&lt;</span>form method<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;post&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;adduser&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;user-forms&quot;</span> action<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://&lt;?php echo <span style="color: #006699; font-weight: bold;">$_SERVER</span>['HTTP_HOST'] . <span style="color: #006699; font-weight: bold;">$_SERVER</span>['REQUEST_URI']; ?&gt;&quot;</span><span style="color: #339933;">&gt;</span>
&nbsp;
	<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-username&quot;</span><span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;user_name&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Username (required)'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;</span>input name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;user_name&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php if ( <span style="color: #006699; font-weight: bold;">$error</span> ) echo wp_specialchars( <span style="color: #006699; font-weight: bold;">$_POST</span>['user_name'], 1 ); ?&gt;&quot;</span> <span style="color: #339933;">/&gt;</span>
	<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>username <span style="color: #339933;">--&gt;</span>
&nbsp;
	<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-email&quot;</span><span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;email&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'E-mail (required)'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;</span>input name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;email&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php if ( <span style="color: #006699; font-weight: bold;">$error</span> ) echo wp_specialchars( <span style="color: #006699; font-weight: bold;">$_POST</span>['email'], 1 ); ?&gt;&quot;</span> <span style="color: #339933;">/&gt;</span>
	<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>email <span style="color: #339933;">--&gt;</span>
&nbsp;
	<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-twitter&quot;</span><span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;twitter&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Twitter'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;</span>input name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;twitter&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php if ( <span style="color: #006699; font-weight: bold;">$error</span> ) echo wp_specialchars( <span style="color: #006699; font-weight: bold;">$_POST</span>['twitter'], 1 ); ?&gt;&quot;</span> <span style="color: #339933;">/&gt;</span>
	<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>twitter <span style="color: #339933;">--&gt;</span>
&nbsp;
	<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-submit&quot;</span><span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;</span>input name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;adduser&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;submit&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;addusersub&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;submit button&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php if ( current_user_can( 'create_users' ) ) _e('Add User', 'frontendprofile'); else _e('Register', 'frontendprofile'); ?&gt;&quot;</span> <span style="color: #339933;">/&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_nonce_field<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'add-user'</span> <span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
		<span style="color: #339933;">&lt;</span>input name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;action&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;hidden&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;action&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;adduser&quot;</span> <span style="color: #339933;">/&gt;</span>
	<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>submit <span style="color: #339933;">--&gt;</span>
<span style="color: #339933;">&lt;/</span>form<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #666666; font-style: italic;">#adduser --&gt;</span></pre></td></tr></table></div>

<p><strong>Then, when a registration actually occurs, we need to:</strong></p>
<ul>
<li>create a user with all the default fields of meta-data;</li>
<li>separately add the extra meta-data fields;</li>
<li>mail the password to the new user.</li>
</ul>
<p>Reduced to a bare minimum, this is how the code looks like:</p>

<div class="wp_codebox"><table><tr id="p101218"><td class="code" id="p1012code18"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">/* Load registration file. */</span>
<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span> ABSPATH <span style="color: #339933;">.</span> WPINC <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/registration.php'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">/* If user registered, input info. */</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'POST'</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REQUEST_METHOD'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><a href="http://www.php.net/empty"><span style="color: #990000;">empty</span></a><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'action'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'action'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'adduser'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$user_pass</span> <span style="color: #339933;">=</span> wp_generate_password<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$userdata</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'user_pass'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$user_pass</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'user_login'</span> <span style="color: #339933;">=&gt;</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'user_name'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'user_email'</span> <span style="color: #339933;">=&gt;</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'email'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #000088;">$userdata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'user_login'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #000088;">$error</span> <span style="color: #339933;">=</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'A username is required for registration.'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> username_exists<span style="color: #009900;">&#40;</span><span style="color: #000088;">$userdata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'user_login'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #000088;">$error</span> <span style="color: #339933;">=</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Sorry, that username already exists!'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span>is_email<span style="color: #009900;">&#40;</span><span style="color: #000088;">$userdata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'user_email'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #000088;">$error</span> <span style="color: #339933;">=</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'You must enter a valid email address.'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> email_exists<span style="color: #009900;">&#40;</span><span style="color: #000088;">$userdata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'user_email'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #000088;">$error</span> <span style="color: #339933;">=</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Sorry, that email address is already used!'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$new_user</span> <span style="color: #339933;">=</span> wp_insert_user<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$userdata</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		update_usermeta<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$new_user</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'twitter'</span><span style="color: #339933;">,</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'twitter'</span><span style="color: #009900;">&#93;</span>  <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		wp_new_user_notification<span style="color: #009900;">&#40;</span><span style="color: #000088;">$new_user</span><span style="color: #339933;">,</span> <span style="color: #000088;">$user_pass</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Notice the included error reporting features.</p>
<p>Another thing that we should mention is the <code>update_usermeta</code> function. We need to call it because <code>wp_insert_user</code> function doesn&#8217;t take into account extra fields. </p>
<p><strong>Here is the entire registration page template for your Thematic Child Theme.</strong></p>

<div class="wp_codebox"><table><tr id="p101219"><td class="code" id="p1012code19"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009933; font-style: italic;">/**
 * Template Name: Register Page
 *
 */</span>
&nbsp;
<span style="color: #666666; font-style: italic;">/* Load registration file. */</span>
<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span> ABSPATH <span style="color: #339933;">.</span> WPINC <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/registration.php'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">/* Check if users can register. */</span>
<span style="color: #000088;">$registration</span> <span style="color: #339933;">=</span> get_option<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'users_can_register'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">/* If user registered, input info. */</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'POST'</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REQUEST_METHOD'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><a href="http://www.php.net/empty"><span style="color: #990000;">empty</span></a><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'action'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'action'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'adduser'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$user_pass</span> <span style="color: #339933;">=</span> wp_generate_password<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$userdata</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'user_pass'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$user_pass</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'user_login'</span> <span style="color: #339933;">=&gt;</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'user_name'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'first_name'</span> <span style="color: #339933;">=&gt;</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'first_name'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'last_name'</span> <span style="color: #339933;">=&gt;</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'last_name'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'nickname'</span> <span style="color: #339933;">=&gt;</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'nickname'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'user_email'</span> <span style="color: #339933;">=&gt;</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'email'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'user_url'</span> <span style="color: #339933;">=&gt;</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'website'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'aim'</span> <span style="color: #339933;">=&gt;</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'aim'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'yim'</span> <span style="color: #339933;">=&gt;</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'yim'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'jabber'</span> <span style="color: #339933;">=&gt;</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'jabber'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'description'</span> <span style="color: #339933;">=&gt;</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'description'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'role'</span> <span style="color: #339933;">=&gt;</span> get_option<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'default_role'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #000088;">$userdata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'user_login'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #000088;">$error</span> <span style="color: #339933;">=</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'A username is required for registration.'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> username_exists<span style="color: #009900;">&#40;</span><span style="color: #000088;">$userdata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'user_login'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #000088;">$error</span> <span style="color: #339933;">=</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Sorry, that username already exists!'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span>is_email<span style="color: #009900;">&#40;</span><span style="color: #000088;">$userdata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'user_email'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #000088;">$error</span> <span style="color: #339933;">=</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'You must enter a valid email address.'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> email_exists<span style="color: #009900;">&#40;</span><span style="color: #000088;">$userdata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'user_email'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #000088;">$error</span> <span style="color: #339933;">=</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Sorry, that email address is already used!'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$new_user</span> <span style="color: #339933;">=</span> wp_insert_user<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$userdata</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		wp_new_user_notification<span style="color: #009900;">&#40;</span><span style="color: #000088;">$new_user</span><span style="color: #339933;">,</span> <span style="color: #000088;">$user_pass</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		update_usermeta<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$new_user</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'twitter'</span><span style="color: #339933;">,</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'twitter'</span><span style="color: #009900;">&#93;</span>  <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		update_usermeta<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$new_user</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'birth'</span><span style="color: #339933;">,</span>   esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'birth'</span><span style="color: #009900;">&#93;</span>    <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		update_usermeta<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$new_user</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'hobbies'</span><span style="color: #339933;">,</span>           <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'hobbies'</span><span style="color: #009900;">&#93;</span>    <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		update_usermeta<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$new_user</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'agree'</span><span style="color: #339933;">,</span>   esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'agree'</span><span style="color: #009900;">&#93;</span>    <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
&nbsp;
    <span style="color: #666666; font-style: italic;">// calling the header.php</span>
    get_header<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// action hook for placing content above #container</span>
    thematic_abovecontainer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
	<span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;container&quot;</span><span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;content&quot;</span><span style="color: #339933;">&gt;</span>
&nbsp;
            <span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
            <span style="color: #666666; font-style: italic;">// calling the widget area 'page-top'</span>
            get_sidebar<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'page-top'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            the_post<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
			<span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;post-&lt;?php the_ID(); ?&gt;&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php thematic_post_class() ?&gt;&quot;</span><span style="color: #339933;">&gt;</span>
&nbsp;
                <span style="color: #000000; font-weight: bold;">&lt;?php</span> 
&nbsp;
                <span style="color: #666666; font-style: italic;">// creating the post header</span>
                thematic_postheader<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>div <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;entry-content&quot;</span><span style="color: #339933;">&gt;</span>
&nbsp;
                    <span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
                    the_content<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                    wp_link_pages<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span>&lt;div class='page-link'&gt;&quot;</span><span style="color: #339933;">.</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Pages: '</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'thematic'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&lt;/div&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'number'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                    edit_post_link<span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Edit'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'thematic'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'&lt;span class=&quot;edit-link&quot;&gt;'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'&lt;/span&gt;'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span>
			<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>post <span style="color: #339933;">--&gt;</span>
&nbsp;
<span style="color: #339933;">&lt;!--</span> REGISTER FORM STARTS HERE <span style="color: #339933;">--&gt;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_user_logged_in<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span>current_user_can<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'create_users'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
			<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;log-in-out alert&quot;</span><span style="color: #339933;">&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;?php</span> <a href="http://www.php.net/printf"><span style="color: #990000;">printf</span></a><span style="color: #009900;">&#40;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'You are logged in as &lt;a href=&quot;%1$s&quot; title=&quot;%2$s&quot;&gt;%2$s&lt;/a&gt;.  You don\'t need another account.'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> get_author_posts_url<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$curauth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$user_identity</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> <span style="color: #339933;">&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php echo wp_logout_url( get_permalink() ); ?&gt;&quot;</span> title<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php _e('Log out of this account', 'frontendprofile'); ?&gt;&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Logout &amp;raquo;'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;</span>
			<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>log<span style="color: #339933;">-</span>in<span style="color: #339933;">-</span>out <span style="color: #339933;">.</span>alert <span style="color: #339933;">--&gt;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$new_user</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
			<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;alert&quot;</span><span style="color: #339933;">&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;?php</span>
				<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> current_user_can<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'create_users'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
					<a href="http://www.php.net/printf"><span style="color: #990000;">printf</span></a><span style="color: #009900;">&#40;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'A user account for %1$s has been created.'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'user-name'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #b1b100;">else</span> 
					<a href="http://www.php.net/printf"><span style="color: #990000;">printf</span></a><span style="color: #009900;">&#40;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Thank you for registering, %1$s.'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'user-name'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					<a href="http://www.php.net/printf"><span style="color: #990000;">printf</span></a><span style="color: #009900;">&#40;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'&lt;br/&gt;Please check your email address. That\'s where you\'ll recieve your login password.&lt;br/&gt; (It might go into your spam folder)'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000000; font-weight: bold;">?&gt;</span>
			<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>alert <span style="color: #339933;">--&gt;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
			<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$error</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;error&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$error</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>error <span style="color: #339933;">--&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
			<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> current_user_can<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'create_users'</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$registration</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;alert&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Users can register themselves or you can manually create users here.'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>alert <span style="color: #339933;">--&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> current_user_can<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'create_users'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;alert&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Users cannot currently register themselves, but you can manually create users here.'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>alert <span style="color: #339933;">--&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
			<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$registration</span> <span style="color: #339933;">||</span> current_user_can<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'create_users'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
			<span style="color: #339933;">&lt;</span>form method<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;post&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;adduser&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;user-forms&quot;</span> action<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://&lt;?php echo <span style="color: #006699; font-weight: bold;">$_SERVER</span>['HTTP_HOST'] . <span style="color: #006699; font-weight: bold;">$_SERVER</span>['REQUEST_URI']; ?&gt;&quot;</span><span style="color: #339933;">&gt;</span>
&nbsp;
&nbsp;
				<span style="color: #339933;">&lt;</span>strong<span style="color: #339933;">&gt;</span>Name<span style="color: #339933;">&lt;/</span>strong<span style="color: #339933;">&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-username&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;user_name&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Username (required)'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>input <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text-input&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;user_name&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;user_name&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php if ( <span style="color: #006699; font-weight: bold;">$error</span> ) echo wp_specialchars( <span style="color: #006699; font-weight: bold;">$_POST</span>['user_name'], 1 ); ?&gt;&quot;</span> <span style="color: #339933;">/&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>username <span style="color: #339933;">--&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;first_name&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;first_name&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'First Name'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>input <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text-input&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;first_name&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;first_name&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php if ( <span style="color: #006699; font-weight: bold;">$error</span> ) echo wp_specialchars( <span style="color: #006699; font-weight: bold;">$_POST</span>['first_name'], 1 ); ?&gt;&quot;</span> <span style="color: #339933;">/&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>first_name <span style="color: #339933;">--&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;last_name&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;last_name&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Last Name'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>input <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text-input&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;last_name&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;last_name&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php if ( <span style="color: #006699; font-weight: bold;">$error</span> ) echo wp_specialchars( <span style="color: #006699; font-weight: bold;">$_POST</span>['last_name'], 1 ); ?&gt;&quot;</span> <span style="color: #339933;">/&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>last_name <span style="color: #339933;">--&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;nickname&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;nickname&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Nickname'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>input <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text-input&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;nickname&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;nickname&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php if ( <span style="color: #006699; font-weight: bold;">$error</span> ) echo wp_specialchars( <span style="color: #006699; font-weight: bold;">$_POST</span>['nickname'], 1 ); ?&gt;&quot;</span> <span style="color: #339933;">/&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>nickname <span style="color: #339933;">--&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>strong<span style="color: #339933;">&gt;</span>Contact Info<span style="color: #339933;">&lt;/</span>strong<span style="color: #339933;">&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-email&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;email&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'E-mail (required)'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>input <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text-input&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;email&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;email&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php if ( <span style="color: #006699; font-weight: bold;">$error</span> ) echo wp_specialchars( <span style="color: #006699; font-weight: bold;">$_POST</span>['email'], 1 ); ?&gt;&quot;</span> <span style="color: #339933;">/&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>email <span style="color: #339933;">--&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-website&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;website&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Website'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>input <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text-input&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;website&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;website&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php if ( <span style="color: #006699; font-weight: bold;">$error</span> ) echo wp_specialchars( <span style="color: #006699; font-weight: bold;">$_POST</span>['website'], 1 ); ?&gt;&quot;</span> <span style="color: #339933;">/&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>website <span style="color: #339933;">--&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-aim&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;aim&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'AIM'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>input <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text-input&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;aim&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;aim&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php if ( <span style="color: #006699; font-weight: bold;">$error</span> ) echo wp_specialchars( <span style="color: #006699; font-weight: bold;">$_POST</span>['aim'], 1 ); ?&gt;&quot;</span> <span style="color: #339933;">/&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>aim <span style="color: #339933;">--&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-yim&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;yim&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Yahoo IM'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>input <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text-input&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;yim&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;yim&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php if ( <span style="color: #006699; font-weight: bold;">$error</span> ) echo wp_specialchars( <span style="color: #006699; font-weight: bold;">$_POST</span>['yim'], 1 ); ?&gt;&quot;</span> <span style="color: #339933;">/&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>yim <span style="color: #339933;">--&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-jabber&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;jabber&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Jabber / Google Talk'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>input <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text-input&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;jabber&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;jabber&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php if ( <span style="color: #006699; font-weight: bold;">$error</span> ) echo wp_specialchars( <span style="color: #006699; font-weight: bold;">$_POST</span>['jabber'], 1 ); ?&gt;&quot;</span> <span style="color: #339933;">/&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>jabber <span style="color: #339933;">--&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>strong<span style="color: #339933;">&gt;</span>About Yourself<span style="color: #339933;">&lt;/</span>strong<span style="color: #339933;">&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-description&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;description&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Biographical Info'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>textarea <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text-input&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;description&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;description&quot;</span> rows<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;5&quot;</span> cols<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;30&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$error</span> <span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">echo</span> wp_specialchars<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'description'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>textarea<span style="color: #339933;">&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>description <span style="color: #339933;">--&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>strong<span style="color: #339933;">&gt;</span>Extra Profile Information<span style="color: #339933;">&lt;/</span>strong<span style="color: #339933;">&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-twitter&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;twitter&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Twitter'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>input <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text-input&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;twitter&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;twitter&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php if ( <span style="color: #006699; font-weight: bold;">$error</span> ) echo wp_specialchars( <span style="color: #006699; font-weight: bold;">$_POST</span>['twitter'], 1 ); ?&gt;&quot;</span> <span style="color: #339933;">/&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>twitter <span style="color: #339933;">--&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-birth&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;birth&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Year of birth'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
					<span style="color: #000000; font-weight: bold;">&lt;?php</span>
						<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">1900</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">&lt;=</span><span style="color: #cc66cc;">2000</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
							<span style="color: #000088;">$years</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">=</span><span style="color: #000088;">$i</span><span style="color: #339933;">;</span>
&nbsp;
						<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;select name=&quot;birth&quot;&gt;'</span><span style="color: #339933;">;</span>
							<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;option value=&quot;&quot;&gt;'</span> <span style="color: #339933;">.</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Select Year&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;/option&gt;'</span><span style="color: #339933;">;</span>
							<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$years</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$year</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
								<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$error</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$year</span><span style="color: #339933;">==</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'birth'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$selected</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'selected=&quot;slelected&quot;'</span><span style="color: #339933;">;</span>
								<span style="color: #b1b100;">else</span> <span style="color: #000088;">$selected</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
								<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;option value=&quot;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$year</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot; '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$selected</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$year</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;/option&gt;'</span><span style="color: #339933;">;</span>
							<span style="color: #009900;">&#125;</span>
						<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;/select&gt;'</span><span style="color: #339933;">;</span>
					<span style="color: #000000; font-weight: bold;">?&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>birth <span style="color: #339933;">--&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-hobbies&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;hobbies&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'What are your hobbies?'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
					<span style="color: #000000; font-weight: bold;">&lt;?php</span>
						<span style="color: #000088;">$hobbies</span> <span style="color: #339933;">=</span> get_the_author_meta<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'hobbies'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					<span style="color: #000000; font-weight: bold;">?&gt;</span>
					<span style="color: #339933;">&lt;</span>ul <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;hobbies-type-list&quot;</span><span style="color: #339933;">&gt;</span>
						<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>input value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;videogames&quot;</span>           name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;hobbies[]&quot;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/is_array"><span style="color: #990000;">is_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'hobbies'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$error</span> <span style="color: #339933;">&amp;&amp;</span> <a href="http://www.php.net/in_array"><span style="color: #990000;">in_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;videogames&quot;</span><span style="color: #339933;">,</span>           <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'hobbies'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>checked<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checked&quot;</span><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">?&gt;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checkbox&quot;</span> <span style="color: #339933;">/&gt;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Video Games'</span><span style="color: #339933;">,</span>           <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>li<span style="color: #339933;">&gt;</span>
						<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>input value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;sabotagingcapitalism&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;hobbies[]&quot;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/is_array"><span style="color: #990000;">is_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'hobbies'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$error</span> <span style="color: #339933;">&amp;&amp;</span> <a href="http://www.php.net/in_array"><span style="color: #990000;">in_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;sabotagingcapitalism&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'hobbies'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>checked<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checked&quot;</span><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">?&gt;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checkbox&quot;</span> <span style="color: #339933;">/&gt;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Sabotaging Capitalism'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>li<span style="color: #339933;">&gt;</span>
						<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>input value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;watchingtv&quot;</span>           name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;hobbies[]&quot;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/is_array"><span style="color: #990000;">is_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'hobbies'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$error</span> <span style="color: #339933;">&amp;&amp;</span> <a href="http://www.php.net/in_array"><span style="color: #990000;">in_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;watchingtv&quot;</span><span style="color: #339933;">,</span>           <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'hobbies'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>checked<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checked&quot;</span><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">?&gt;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checkbox&quot;</span> <span style="color: #339933;">/&gt;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Watching TV'</span><span style="color: #339933;">,</span>           <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>li<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;/</span>ul<span style="color: #339933;">&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>hobbies <span style="color: #339933;">--&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-agree&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;agree&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Do you agree that WordPress is the greatest thing since bread came sliced?'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
					<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$agree</span> <span style="color: #339933;">=</span> get_the_author_meta<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'agree'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
					<span style="color: #339933;">&lt;</span>ul<span style="color: #339933;">&gt;</span>
						<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>input value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;yes&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;agree&quot;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'agree'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'yes'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>checked<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checked&quot;</span><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">?&gt;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;radio&quot;</span> <span style="color: #339933;">/&gt;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Yes'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>li<span style="color: #339933;">&gt;</span>
						<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>input value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;no&quot;</span>  name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;agree&quot;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'agree'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'no'</span>  <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>checked<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checked&quot;</span><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">?&gt;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;radio&quot;</span> <span style="color: #339933;">/&gt;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'No'</span><span style="color: #339933;">,</span>  <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>li<span style="color: #339933;">&gt;</span>
					<span style="color: #339933;">&lt;/</span>ul<span style="color: #339933;">&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>agree <span style="color: #339933;">--&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;form-submit&quot;</span><span style="color: #339933;">&gt;</span>
					<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$referer</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
					<span style="color: #339933;">&lt;</span>input name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;adduser&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;submit&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;addusersub&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;submit button&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php if ( current_user_can( 'create_users' ) ) _e('Add User', 'frontendprofile'); else _e('Register', 'frontendprofile'); ?&gt;&quot;</span> <span style="color: #339933;">/&gt;</span>
					<span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_nonce_field<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'add-user'</span> <span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
					<span style="color: #339933;">&lt;</span>input name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;action&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;hidden&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;action&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;adduser&quot;</span> <span style="color: #339933;">/&gt;</span>
				<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>submit <span style="color: #339933;">--&gt;</span>
&nbsp;
			<span style="color: #339933;">&lt;/</span>form<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #666666; font-style: italic;">#adduser --&gt;
</span>
			<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
<span style="color: #339933;">&lt;!--</span> REGISTER FORM ENDS HERE <span style="color: #339933;">--&gt;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> get_post_custom_values<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'comments'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> 
            thematic_comments_template<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Add a key/value of &quot;comments&quot; to enable comments on pages!</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// calling the widget area 'page-bottom'</span>
        get_sidebar<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'page-bottom'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
		<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #666666; font-style: italic;">#content --&gt;
</span>	<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #666666; font-style: italic;">#container --&gt;
</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> 
&nbsp;
    <span style="color: #666666; font-style: italic;">// action hook for placing content below #container</span>
    thematic_belowcontainer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// calling the standard sidebar </span>
    thematic_sidebar<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// calling footer.php</span>
    get_footer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<h4>User Log-In Page Template</h4>
<p>The third and last template is the <strong>Log-In Template</strong>. Much of it was inspired by Justin Tadlock&#8217;s work and it basically consists of the form with the username and password fields and the <code>wp_signon()</code> function at the top that actually does all the dirty work.</p>

<div class="wp_codebox"><table><tr id="p101220"><td class="code" id="p1012code20"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009933; font-style: italic;">/**
 * Template Name: Log In Page
 *
 */</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'POST'</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REQUEST_METHOD'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><a href="http://www.php.net/empty"><span style="color: #990000;">empty</span></a><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'action'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'action'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'log-in'</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$error</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$login</span> <span style="color: #339933;">=</span> wp_login<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'user-name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'password'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$login</span> <span style="color: #339933;">=</span> wp_signon<span style="color: #009900;">&#40;</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'user_login'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'user-name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'user_password'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'password'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'remember'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'remember-me'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// calling the header.php</span>
    get_header<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// action hook for placing content above #container</span>
    thematic_abovecontainer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
	<span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;container&quot;</span><span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;content&quot;</span><span style="color: #339933;">&gt;</span>
&nbsp;
            <span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
            <span style="color: #666666; font-style: italic;">// calling the widget area 'page-top'</span>
            get_sidebar<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'page-top'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            the_post<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
			<span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;post-&lt;?php the_ID(); ?&gt;&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php thematic_post_class() ?&gt;&quot;</span><span style="color: #339933;">&gt;</span>
&nbsp;
                <span style="color: #000000; font-weight: bold;">&lt;?php</span> 
&nbsp;
                <span style="color: #666666; font-style: italic;">// creating the post header</span>
                thematic_postheader<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>div <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;entry-content&quot;</span><span style="color: #339933;">&gt;</span>
&nbsp;
                    <span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
                    the_content<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                    wp_link_pages<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span>&lt;div class='page-link'&gt;&quot;</span><span style="color: #339933;">.</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Pages: '</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'thematic'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&lt;/div&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'number'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                    edit_post_link<span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Edit'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'thematic'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'&lt;span class=&quot;edit-link&quot;&gt;'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'&lt;/span&gt;'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span>
			<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>post <span style="color: #339933;">--&gt;</span>
&nbsp;
<span style="color: #339933;">&lt;!--</span> LOGIN STARTS HERE <span style="color: #339933;">--&gt;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_user_logged_in<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// Already logged in ?&gt;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$user_ID</span><span style="color: #339933;">;</span> <span style="color: #000088;">$login</span> <span style="color: #339933;">=</span> get_userdata<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$user_ID</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
		<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;alert&quot;</span><span style="color: #339933;">&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;?php</span> <a href="http://www.php.net/printf"><span style="color: #990000;">printf</span></a><span style="color: #009900;">&#40;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'You are currently logged in as &lt;a href=&quot;%1$s&quot; title=&quot;%2$s&quot;&gt;%2$s&lt;/a&gt;.'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> get_author_posts_url<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$login</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$login</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">display_name</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> <span style="color: #339933;">&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php echo wp_logout_url( get_permalink() ); ?&gt;&quot;</span> title<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php _e('Log out of this account', 'frontendprofile'); ?&gt;&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Log out &amp;raquo;'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>alert <span style="color: #339933;">--&gt;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$login</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// Successful login ?&gt;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$login</span> <span style="color: #339933;">=</span> get_userdata<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$login</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
		<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;alert&quot;</span><span style="color: #339933;">&gt;</span>
&nbsp;
				<span style="color: #000000; font-weight: bold;">&lt;?php</span> <a href="http://www.php.net/printf"><span style="color: #990000;">printf</span></a><span style="color: #009900;">&#40;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'You have successfully logged in as &lt;a href=&quot;%1$s&quot; title=&quot;%2$s&quot;&gt;%2$s&lt;/a&gt;.'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> get_author_posts_url<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$login</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$login</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">display_name</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
		<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>alert <span style="color: #339933;">--&gt;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// Not logged in ?&gt;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$error</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
			<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;error&quot;</span><span style="color: #339933;">&gt;</span>
				<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$error</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
			<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>error <span style="color: #339933;">--&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
		<span style="color: #339933;">&lt;</span>form action<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php the_permalink(); ?&gt;&quot;</span> method<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;post&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;sign-in&quot;</span><span style="color: #339933;">&gt;</span>
			<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;login-form-username&quot;</span><span style="color: #339933;">&gt;</span>
				<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;user-name&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Username'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
				<span style="color: #339933;">&lt;</span>input type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;user-name&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;user-name&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text-input&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php echo wp_specialchars( <span style="color: #006699; font-weight: bold;">$_POST</span>['user-name'], 1 ); ?&gt;&quot;</span> <span style="color: #339933;">/&gt;</span>
			<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>username <span style="color: #339933;">--&gt;</span>
&nbsp;
			<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;login-form-password&quot;</span><span style="color: #339933;">&gt;</span>
				<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;password&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Password'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
				<span style="color: #339933;">&lt;</span>input type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;password&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;password&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;password&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text-input&quot;</span> <span style="color: #339933;">/&gt;</span>
			<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>password <span style="color: #339933;">--&gt;</span>
&nbsp;
			<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;login-form-submit&quot;</span><span style="color: #339933;">&gt;</span>
				<span style="color: #339933;">&lt;</span>input type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;submit&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;submit&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;submit button&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php _e('Log in', 'frontendprofile'); ?&gt;&quot;</span> <span style="color: #339933;">/&gt;</span>
				<span style="color: #339933;">&lt;</span>input <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;remember-me checkbox&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;remember-me&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;remember-me&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checkbox&quot;</span> checked<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checked&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;forever&quot;</span> <span style="color: #339933;">/&gt;</span>
				<span style="color: #339933;">&lt;</span>label <span style="color: #b1b100;">for</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;remember-me&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Remember me'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span>
				<span style="color: #339933;">&lt;</span>input type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;hidden&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;action&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;log-in&quot;</span> <span style="color: #339933;">/&gt;</span>
			<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>form<span style="color: #339933;">-</span>submit <span style="color: #339933;">--&gt;</span>
&nbsp;
			<span style="color: #339933;">&lt;</span>p<span style="color: #339933;">&gt;</span>
				<span style="color: #339933;">&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php echo get_option('siteurl');  ?&gt;/wp-login.php?action=lostpassword&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Lost password?'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'frontendprofile'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;</span>
			<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;/</span>form<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #339933;">.</span>sign<span style="color: #339933;">-</span>in <span style="color: #339933;">--&gt;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
<span style="color: #339933;">&lt;!--</span> LOGIN ENDS HERE <span style="color: #339933;">--&gt;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> get_post_custom_values<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'comments'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> 
            thematic_comments_template<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Add a key/value of &quot;comments&quot; to enable comments on pages!</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// calling the widget area 'page-bottom'</span>
        get_sidebar<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'page-bottom'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
		<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #666666; font-style: italic;">#content --&gt;
</span>	<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #666666; font-style: italic;">#container --&gt;
</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> 
&nbsp;
    <span style="color: #666666; font-style: italic;">// action hook for placing content below #container</span>
    thematic_belowcontainer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// calling the standard sidebar </span>
    thematic_sidebar<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// calling footer.php</span>
    get_footer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<h3>Conclusions</h3>
<p>WordPress dose allow you to add any kind of fields to your user profile. It&#8217;s not very developer friendly and there&#8217;s a lot of validations that we need to do but it is possible and that&#8217;s all that matters if you ask me.</p>
<p>We need an UI in the core of WordPress for this, but probably we won&#8217;t have anything like this for quite a while. </p>
<p>The funny thing is that BuddyPress has a plugin that let&#8217;s you create <strong>extra user fields</strong> and displays them in the front end, but not in the backend. And we also have a plugin that is called Cimy User Extra Fields that creates the extra fields for the backend but it&#8217;s still more a developer&#8217;s tool and not that easy to use for the standard user. But there isn&#8217;t any real integration so that&#8217;s the bad thing. </p>
<p>The way this should work in an ideal word would be for us to have an UI in the backend and page templates that come with the default WordPress theme so developers can build on top of that (similar to the comments form).</p>
<h3>Extra Struff</h3>
<p>You can follow the tutorial to create your Extra User Fields or you can just preview / download the child theme directly and then make it fit your needs.</p>
<div class="preview_download">
<a href="http://cozmoslabs.com/project/thematic-frontend-profile/"><img src="http://www.cozmoslabs.com/wp-content/uploads/2009/07/preview.gif" alt="preview"/></a><a class="downloadlink dlimg" href="http://www.cozmoslabs.com/wp-content/plugins/download-monitor/download.php?id=11" title="Version 1.0 downloaded 337 times" ><img src="http://www.cozmoslabs.com/wp-content/plugins/download-monitor/img/download.gif" alt="Download Thematic Frontend Profile Version 1.0" /></a>
</div>
<h3>Credits</h3>
<p><a href="http://www.dquinn.net/adding-custom-user-meta-profile-fields-wordpress/">http://dquinn.net</a><br />
<a href="http://blog.ftwr.co.uk/archives/2009/07/19/adding-extra-user-meta-fields/">http://blog.ftwr.co.uk</a><br />
<a href="http://rubenwoudsma.nl/wordpress-gebruikersprofiel-uitbreiden/">http://rubenwoudsma.nl</a><br />
<a href="http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user-profile-fields">http://justintadlock.com</a></p>


<p>Related posts:<ol><li><a href='http://www.cozmoslabs.com/2008/08/11/10-design-tips-for-your-custom-wordpress-theme-built-with-thematic/' rel='bookmark' title='Permanent Link: 10 design tips for your custom wordpress theme built with thematic'>10 design tips for your custom wordpress theme built with thematic</a></li>
<li><a href='http://www.cozmoslabs.com/2009/06/16/wordpress-as-a-social-platform/' rel='bookmark' title='Permanent Link: WordPress as a social platform'>WordPress as a social platform</a></li>
<li><a href='http://www.cozmoslabs.com/2009/07/20/early-morning-child-theme/' rel='bookmark' title='Permanent Link: Early Morning Child Theme'>Early Morning Child Theme</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.cozmoslabs.com/2010/05/31/wordpress-user-registration-template-and-custom-user-profile-fields/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Thematic Tabbed Widgets</title>
		<link>http://www.cozmoslabs.com/2010/05/02/thematic-tabbed-widgets/</link>
		<comments>http://www.cozmoslabs.com/2010/05/02/thematic-tabbed-widgets/#comments</comments>
		<pubDate>Sun, 02 May 2010 19:19:26 +0000</pubDate>
		<dc:creator>Cristian</dc:creator>
				<category><![CDATA[Thematic]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[tabbed widgets]]></category>
		<category><![CDATA[thematic tabed widgets]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://www.cozmoslabs.com/?p=1014</guid>
		<description><![CDATA[Tabbed widgets for WordPress themes have been around since WordPress it self. They are a perfect way to save on vertical space and add a bit of interaction with the users. There are two classic ways of implementing the tabbed widgets. Creating a hard coded widget and using the jQuery Cycle plugin. This means you [...]


Related posts:<ol><li><a href='http://www.cozmoslabs.com/2009/04/07/green-anyone-try-commune-thematic-child-theme/' rel='bookmark' title='Permanent Link: <span style="color:#7fae52">Green anyone?</span> Try Commune &#8211; Thematic Child Theme!'><span style="color:#7fae52">Green anyone?</span> Try Commune &#8211; Thematic Child Theme!</a></li>
<li><a href='http://www.cozmoslabs.com/2009/07/20/early-morning-child-theme/' rel='bookmark' title='Permanent Link: Early Morning Child Theme'>Early Morning Child Theme</a></li>
<li><a href='http://www.cozmoslabs.com/2009/06/26/thematic-featured-posts/' rel='bookmark' title='Permanent Link: Add &#8220;Featured Posts&#8221; to your Thematic child theme'>Add &#8220;Featured Posts&#8221; to your Thematic child theme</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_1031" class="wp-caption alignright" style="width: 310px"><img src="http://www.cozmoslabs.com/wp-content/uploads/2010/05/tabs1.png" alt="" title="tabs" width="300" height="126" class="size-full wp-image-1031" /><p class="wp-caption-text">Tabbed widget areas for Thematic</p></div><br />
Tabbed widgets for WordPress themes have been around since WordPress it self. They are a perfect way to save on vertical space and add a bit of interaction with the users. </p>
<p>There are two classic ways of implementing the tabbed widgets. </p>
<ul>
<li>Creating a hard coded widget and using the jQuery Cycle plugin. This means you can&#8217;t easily modify the content of the tabs unless you open the widget file.</li>
<li>Using a tabbed widget plugin. While this is ok for some users it just ads a lot extra code that doesn&#8217;t justify the end.</li>
</ul>
<p>Luckily there is a optimized way of doing things. Write a bit of javascript that converts any default thematic widget area into <strong>a tabbed widget area</strong>. The title of the widgets placed in you widget area will automatically become the widget tabs. </p>
<p><span id="more-1014"></span></p>
<h3>The jQuery Tabbed Widgets Plugin</h3>
<p>This piece of code comes from a friend of mine, <a href="http://twitter.com/dturton">David Turton</a>. It was initially written for a different html structure, so that means the code I&#8217;ll post here will be easily modified to support any WordPress widget areas and transform them into a tabbed widget area.</p>

<div class="wp_codebox"><table><tr id="p101425"><td class="code" id="p1014code25"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	$.<span style="color: #660066;">fn</span>.<span style="color: #660066;">dttabs</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>options<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
		<span style="color: #003366; font-weight: bold;">var</span> options <span style="color: #339933;">=</span> $.<span style="color: #660066;">extend</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
			widgetid <span style="color: #339933;">:</span> <span style="color: #3366CC;">'#secondary'</span><span style="color: #339933;">,</span>
			fade <span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">,</span>
			tabTitleReference <span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">,</span>
			interval <span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">,</span>
			startTab <span style="color: #339933;">:</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">,</span>
			tabContainerName <span style="color: #339933;">:</span> <span style="color: #3366CC;">'tab-items'</span>
		<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> options<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>			
&nbsp;
			<span style="color: #003366; font-weight: bold;">var</span> $this <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
				divCount <span style="color: #339933;">=</span> $this.<span style="color: #660066;">children</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'li'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">length</span><span style="color: #339933;">,</span>
				tabContainer <span style="color: #339933;">=</span> <span style="color: #3366CC;">'&lt;ul id=&quot;'</span> <span style="color: #339933;">+</span> options.<span style="color: #660066;">tabContainerName</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&quot;&gt;'</span><span style="color: #339933;">;</span>
&nbsp;
				$this
					.<span style="color: #660066;">children</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'li:not(:nth-child('</span> <span style="color: #339933;">+</span> options.<span style="color: #660066;">startTab</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'))'</span><span style="color: #009900;">&#41;</span>
					.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
					.<span style="color: #660066;">end</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
					.<span style="color: #660066;">hover</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
						$this.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'hovered'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
						$this.<span style="color: #660066;">removeClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'hovered'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>						
&nbsp;
				<span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;=</span> divCount<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
					<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> options.<span style="color: #660066;">tabTitleReference</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
						<span style="color: #003366; font-weight: bold;">var</span> heading <span style="color: #339933;">=</span> $this
										.<span style="color: #660066;">children</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'li:nth-child('</span> <span style="color: #339933;">+</span> i <span style="color: #339933;">+</span> <span style="color: #3366CC;">')'</span><span style="color: #009900;">&#41;</span>
										.<span style="color: #660066;">find</span><span style="color: #009900;">&#40;</span>options.<span style="color: #660066;">tabTitleReference</span><span style="color: #009900;">&#41;</span>
										.<span style="color: #660066;">filter</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">':first'</span><span style="color: #009900;">&#41;</span>
										.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
						<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> heading <span style="color: #339933;">!==</span> <span style="color: #3366CC;">''</span> <span style="color: #009900;">&#41;</span> tabContainer <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'&lt;li&gt;&lt;a href=&quot;#&quot; class=&quot;tab'</span> <span style="color: #339933;">+</span> i <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&quot; rel=&quot;'</span> <span style="color: #339933;">+</span> i <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&quot;&gt;'</span> <span style="color: #339933;">+</span> heading <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&lt;/a&gt;&lt;/li&gt;'</span><span style="color: #339933;">;</span>
						<span style="color: #000066; font-weight: bold;">else</span> tabContainer <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'&lt;li&gt;&lt;a href=&quot;#&quot; class=&quot;tab'</span> <span style="color: #339933;">+</span> i <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&quot; rel=&quot;'</span> <span style="color: #339933;">+</span> i <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&quot;&gt;'</span> <span style="color: #339933;">+</span> i <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&lt;/a&gt;&lt;/li&gt;'</span><span style="color: #339933;">;</span>
					<span style="color: #009900;">&#125;</span>
					<span style="color: #000066; font-weight: bold;">else</span> tabContainer <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'&lt;li&gt;&lt;a href=&quot;#&quot; class=&quot;tab'</span> <span style="color: #339933;">+</span> i <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&quot; rel=&quot;'</span> <span style="color: #339933;">+</span> i <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&quot;&gt;'</span> <span style="color: #339933;">+</span> i <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&lt;/a&gt;&lt;/li&gt;'</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
				tabContainer <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'&lt;/ul&gt;'</span><span style="color: #339933;">;</span>
				$<span style="color: #009900;">&#40;</span>options.<span style="color: #660066;">widgetid</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">prepend</span><span style="color: #009900;">&#40;</span>tabContainer<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
				<span style="color: #003366; font-weight: bold;">var</span> $container <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#'</span> <span style="color: #339933;">+</span> options.<span style="color: #660066;">tabContainerName</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
				$container
					.<span style="color: #660066;">find</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'li:nth-child('</span> <span style="color: #339933;">+</span> options.<span style="color: #660066;">startTab</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">')'</span><span style="color: #009900;">&#41;</span>
						.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'tab-selected'</span><span style="color: #009900;">&#41;</span>
					.<span style="color: #660066;">end</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
					.<span style="color: #660066;">find</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'a'</span><span style="color: #009900;">&#41;</span>
						.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
							<span style="color: #003366; font-weight: bold;">var</span> $a <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
							<span style="color: #003366; font-weight: bold;">var</span> num <span style="color: #339933;">=</span> $a.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'rel'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
							<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> $this
									.<span style="color: #660066;">children</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'li'</span><span style="color: #009900;">&#41;</span>
									.<span style="color: #660066;">eq</span><span style="color: #009900;">&#40;</span>num <span style="color: #339933;">-</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span>
									.<span style="color: #000066; font-weight: bold;">is</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">':visible'</span><span style="color: #009900;">&#41;</span>
							<span style="color: #009900;">&#41;</span> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// user is already on selected tab</span>
&nbsp;
							$container
								.<span style="color: #660066;">find</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'li.tab-selected'</span><span style="color: #009900;">&#41;</span>
								.<span style="color: #660066;">removeClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'tab-selected'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
							$a.<span style="color: #660066;">parent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'tab-selected'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
							<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> options.<span style="color: #660066;">fade</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
								$this
									.<span style="color: #660066;">children</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'li'</span><span style="color: #009900;">&#41;</span>
									.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
									.<span style="color: #660066;">eq</span><span style="color: #009900;">&#40;</span>num <span style="color: #339933;">-</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span>
									.<span style="color: #660066;">fadeIn</span><span style="color: #009900;">&#40;</span>options.<span style="color: #660066;">fade</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
							<span style="color: #009900;">&#125;</span>
&nbsp;
							<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span> 
								$this
									.<span style="color: #660066;">children</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'li'</span><span style="color: #009900;">&#41;</span>
									.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
									.<span style="color: #660066;">eq</span><span style="color: #009900;">&#40;</span>num <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span>
									.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
							<span style="color: #009900;">&#125;</span>
&nbsp;
							<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
						<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
&nbsp;
				<span style="color: #006600; font-style: italic;">// auto change tabs				</span>
				<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> options.<span style="color: #660066;">interval</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
					<span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> options.<span style="color: #660066;">startTab</span><span style="color: #339933;">;</span>
&nbsp;
					setInterval<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
						<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span>$this.<span style="color: #660066;">hasClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'hovered'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
							$container
								.<span style="color: #660066;">find</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'a'</span><span style="color: #009900;">&#41;</span>
								.<span style="color: #660066;">eq</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span>
								.<span style="color: #660066;">trigger</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
							i<span style="color: #339933;">++;</span>
							<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> i <span style="color: #339933;">===</span> divCount <span style="color: #009900;">&#41;</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
						<span style="color: #009900;">&#125;</span>
&nbsp;
					<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> options.<span style="color: #660066;">interval</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 				<span style="color: #009900;">&#125;</span>			
&nbsp;
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// end each</span>
&nbsp;
	<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>jQuery<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>This is the jQuery plugin and now all we need to do is to initiate our tabbed widget.</p>

<div class="wp_codebox"><table><tr id="p101426"><td class="code" id="p1014code26"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">'text/javascript'</span><span style="color: #339933;">&gt;</span>
jQuery<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#secondary&gt;.xoxo'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">dttabs</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
		widgetid <span style="color: #339933;">:</span> <span style="color: #3366CC;">'#secondary'</span><span style="color: #339933;">,</span>
		fade <span style="color: #339933;">:</span> <span style="color: #CC0000;">1000</span><span style="color: #339933;">,</span>
		tabTitleReference <span style="color: #339933;">:</span> <span style="color: #3366CC;">'.widgettitle'</span><span style="color: #339933;">,</span>
		interval <span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">,</span>
		startTab <span style="color: #339933;">:</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">,</span>
		tabContainerName <span style="color: #339933;">:</span> <span style="color: #3366CC;">'tab-items'</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>If we change <strong>#secondary</strong> with <strong>#primary</strong> then the Primary Aside widget will be transformed into a tabbed widget area.</p>
<h3>Integrating the tabbed widget javascript code with Thematic</h3>
<p>Next we need to add these two javascript pieces of code to our child theme. Add the following code to functions.php of your child theme for Thematic.</p>

<div class="wp_codebox"><table><tr id="p101427"><td class="code" id="p1014code27"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> add_js_to_header<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #0000ff;">'text/javascript'</span> src<span style="color: #339933;">=</span><span style="color: #0000ff;">'&lt;?php bloginfo('</span>stylesheet_directory<span style="color: #0000ff;">'); ?&gt;/dttabs.js'</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #0000ff;">'text/javascript'</span><span style="color: #339933;">&gt;</span>
jQuery<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>ready<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	jQuery<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#secondary&gt;.xoxo'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>dttabs<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
		widgetid <span style="color: #339933;">:</span> <span style="color: #0000ff;">'#secondary'</span><span style="color: #339933;">,</span>
		fade <span style="color: #339933;">:</span> <span style="color: #cc66cc;">1000</span><span style="color: #339933;">,</span>
		tabTitleReference <span style="color: #339933;">:</span> <span style="color: #0000ff;">'.widgettitle'</span><span style="color: #339933;">,</span>
		interval <span style="color: #339933;">:</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">,</span>
		startTab <span style="color: #339933;">:</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span>
		tabContainerName <span style="color: #339933;">:</span> <span style="color: #0000ff;">'tab-items'</span><span style="color: #339933;">,</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">&lt;/script&gt;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_head'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'add_js_to_header'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<h3>Adding a bit of style</h3>
<p>The basic functionality is there. However we still need to add a bit of css to the mix or we&#8217;ll have a bad looking tabbed widget <img src='http://www.cozmoslabs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .</p>
<p>This css code goes inside style.css of your child theme.</p>

<div class="wp_codebox"><table><tr id="p101428"><td class="code" id="p1014code28"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/*
	Tabed Widget Area #secondary
*/</span>
&nbsp;
<span style="color: #cc00cc;">#secondary</span> .widgettitle<span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* The title will be in the tabs. We don't need this anymore. */</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#secondary</span>  <span style="color: #cc00cc;">#tab-items</span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#cccccc</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#secondary</span>  <span style="color: #cc00cc;">#tab-items</span> li<span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#secondary</span>  <span style="color: #cc00cc;">#tab-items</span> li a<span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span><span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">3px</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span>inline-<span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">-1px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#secondary</span>  <span style="color: #cc00cc;">#tab-items</span> li<span style="color: #6666ff;">.tab-selected</span> a<span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#ccc</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#secondary</span> .xoxo<span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#ccc</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border-top</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#secondary</span> <span style="color: #6666ff;">.xoxo</span> .xoxo<span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>And now we have a <strong>tabbed widget for Thematic</strong>!</p>
<div class="preview_download">
<a href="http://cozmoslabs.com/project/tabbed-widgets/"><img src="http://www.cozmoslabs.com/wp-content/uploads/2009/07/preview.gif" alt="preview"/></a>
</div>
<div class="preview_download">
The javascript for this short tutorial was adapted from <a href="http://net.tutsplus.com/tutorials/javascript-ajax/how-to-build-a-custom-jquery-tabs-plugin-new-plus-tutorial/">TutsPlus premium tutorials</a>.
</div>


<p>Related posts:<ol><li><a href='http://www.cozmoslabs.com/2009/04/07/green-anyone-try-commune-thematic-child-theme/' rel='bookmark' title='Permanent Link: <span style="color:#7fae52">Green anyone?</span> Try Commune &#8211; Thematic Child Theme!'><span style="color:#7fae52">Green anyone?</span> Try Commune &#8211; Thematic Child Theme!</a></li>
<li><a href='http://www.cozmoslabs.com/2009/07/20/early-morning-child-theme/' rel='bookmark' title='Permanent Link: Early Morning Child Theme'>Early Morning Child Theme</a></li>
<li><a href='http://www.cozmoslabs.com/2009/06/26/thematic-featured-posts/' rel='bookmark' title='Permanent Link: Add &#8220;Featured Posts&#8221; to your Thematic child theme'>Add &#8220;Featured Posts&#8221; to your Thematic child theme</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.cozmoslabs.com/2010/05/02/thematic-tabbed-widgets/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Exclude posts from WordPress Navigation in Thematic</title>
		<link>http://www.cozmoslabs.com/2010/02/10/exclude-posts-from-wordpress-navigation-in-thematic/</link>
		<comments>http://www.cozmoslabs.com/2010/02/10/exclude-posts-from-wordpress-navigation-in-thematic/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 11:01:45 +0000</pubDate>
		<dc:creator>Cristian</dc:creator>
				<category><![CDATA[Thematic]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[categories]]></category>
		<category><![CDATA[child theme]]></category>
		<category><![CDATA[code snippet]]></category>
		<category><![CDATA[exclude]]></category>
		<category><![CDATA[posts]]></category>

		<guid isPermaLink="false">http://www.cozmoslabs.com/?p=961</guid>
		<description><![CDATA[Let&#8217;s say you have a certain category that you want to be displayed some place other than on your main blog page. No big deal, you just exclude your special category from the main index loop. Now, you&#8217;re probably also want to make some changes to the single post navigation, and make it so that [...]


Related posts:<ol><li><a href='http://www.cozmoslabs.com/2009/06/26/thematic-featured-posts/' rel='bookmark' title='Permanent Link: Add &#8220;Featured Posts&#8221; to your Thematic child theme'>Add &#8220;Featured Posts&#8221; to your Thematic child theme</a></li>
<li><a href='http://www.cozmoslabs.com/2008/09/19/wp-greet-box-my-design-and-thematic-the-good-the-bad-and-the-ugly/' rel='bookmark' title='Permanent Link: WP Greet Box, my Design and Thematic &#8211; The Good, the Bad and the Ugly'>WP Greet Box, my Design and Thematic &#8211; The Good, the Bad and the Ugly</a></li>
<li><a href='http://www.cozmoslabs.com/2009/03/20/quickly-add-a-category-dropdown-to-thematic-09/' rel='bookmark' title='Permanent Link: Quickly add a Category DropDown to Thematic 0.9'>Quickly add a Category DropDown to Thematic 0.9</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s say you have a certain category that you want to be displayed some place other than on your main blog page. No big deal, you just exclude your special category from the main index loop.</p>
<p>Now, you&#8217;re probably also want to make some changes to the single post navigation, and make it so that single posts in your special category won&#8217;t get posts from any other category in their navigation links. And also, chances are you&#8217;ll want to exclude posts from your special category from the navigation links of posts in all other categories.</p>
<p>In other words, in the navigation links of single posts from your special category you&#8217;ll only get posts from that category, and in the navigation links of posts from all other categories, you&#8217;ll get posts from all categories except your special category. Two separate navigations.</p>
<p><span id="more-961"></span></p>
<p>For all of this, all you need to do is use the following <strong>two Thematic filters</strong>: <code>thematic_previous_post_link_args</code> and <code>thematic_next_post_link_args</code>. If you&#8217;re interested to look into the code, you can find the filters being applied in <code>thematic/library/extensions/content-extensions.php</code></p>
<p>And here&#8217;s the code snippet to include in your child-theme&#8217;s <code>functions.php</code>:</p>

<div class="wp_codebox"><table><tr id="p96130"><td class="code" id="p961code30"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> custom_previous_post_link_args<span style="color: #009900;">&#40;</span><span style="color: #000088;">$args</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>in_category<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$args</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'in_same_cat'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">TRUE</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$args</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'excluded_categories'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">3</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$args</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'thematic_previous_post_link_args'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'custom_previous_post_link_args'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> custom_next_post_link_args<span style="color: #009900;">&#40;</span><span style="color: #000088;">$args</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>in_category<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$args</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'in_same_cat'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">TRUE</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$args</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'excluded_categories'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">3</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$args</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'thematic_next_post_link_args'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'custom_next_post_link_args'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>



<p>Related posts:<ol><li><a href='http://www.cozmoslabs.com/2009/06/26/thematic-featured-posts/' rel='bookmark' title='Permanent Link: Add &#8220;Featured Posts&#8221; to your Thematic child theme'>Add &#8220;Featured Posts&#8221; to your Thematic child theme</a></li>
<li><a href='http://www.cozmoslabs.com/2008/09/19/wp-greet-box-my-design-and-thematic-the-good-the-bad-and-the-ugly/' rel='bookmark' title='Permanent Link: WP Greet Box, my Design and Thematic &#8211; The Good, the Bad and the Ugly'>WP Greet Box, my Design and Thematic &#8211; The Good, the Bad and the Ugly</a></li>
<li><a href='http://www.cozmoslabs.com/2009/03/20/quickly-add-a-category-dropdown-to-thematic-09/' rel='bookmark' title='Permanent Link: Quickly add a Category DropDown to Thematic 0.9'>Quickly add a Category DropDown to Thematic 0.9</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.cozmoslabs.com/2010/02/10/exclude-posts-from-wordpress-navigation-in-thematic/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Create an &#8220;About the author&#8221; area for Thematic</title>
		<link>http://www.cozmoslabs.com/2009/10/28/create-an-about-the-author-area-for-thematic/</link>
		<comments>http://www.cozmoslabs.com/2009/10/28/create-an-about-the-author-area-for-thematic/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 20:57:14 +0000</pubDate>
		<dc:creator>Cristian</dc:creator>
				<category><![CDATA[Thematic]]></category>
		<category><![CDATA[author template]]></category>
		<category><![CDATA[thematic author]]></category>
		<category><![CDATA[thematic author area]]></category>
		<category><![CDATA[wordpress author area]]></category>

		<guid isPermaLink="false">http://www.cozmoslabs.com/?p=716</guid>
		<description><![CDATA[By default, Thematic comes with a simple and useful representation for the Author Archives template. While this might be enough for the majority of users, there are times when we need more detailed information about the author. This is particularly useful on multi-author blogs, where readers might want to read more posts from a particular [...]


Related posts:<ol><li><a href='http://www.cozmoslabs.com/2009/06/26/thematic-featured-posts/' rel='bookmark' title='Permanent Link: Add &#8220;Featured Posts&#8221; to your Thematic child theme'>Add &#8220;Featured Posts&#8221; to your Thematic child theme</a></li>
<li><a href='http://www.cozmoslabs.com/2009/07/07/how-to-create-a-wordpress-theme/' rel='bookmark' title='Permanent Link: How To Create a WordPress Theme &#8211; a tutorial series by Ian Stewart'>How To Create a WordPress Theme &#8211; a tutorial series by Ian Stewart</a></li>
<li><a href='http://www.cozmoslabs.com/2008/12/17/replacing-the-thematic-menu-with-a-dropdown-list-of-categories/' rel='bookmark' title='Permanent Link: Replacing the Thematic Menu with a DropDown List of Categories'>Replacing the Thematic Menu with a DropDown List of Categories</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.cozmoslabs.com/wp-content/uploads/2009/10/author_page.jpg" alt="author_page" title="author_page" width="300" height="225" class="alignright size-full wp-image-743" /></p>
<p>By default, <a href="http://themeshaper.com/thematic/">Thematic</a> comes with a simple and useful representation for the <strong>Author Archives</strong> template. While this might be enough for the majority of users, there are times when we need more detailed information about the author.</p>
<p>This is particularly useful on multi-author blogs, where readers might want to read more posts from a particular writer! </p>
<h3>The scope of this tutorial is composed of two parts:</h3>
<ol>
<li>Listing the author&#8217;s name, biographical info, gravatar picture and website inside the post body. ( <a href="http://www.cozmoslabs.com/projects/author/2009/10/jims-escape/">Single Post Demo</a> )</li>
<li>Creating an author archive page with the same info as above, plus we&#8217;ll list the author&#8217;s posts in a different way (Thematic already has this functionality implemented, but we&#8217;ll do some changes to the styling and the way the posts are displayed). (<a href="http://www.cozmoslabs.com/projects/author/author/admin/">Author Archives Demo</a>)</li>
</ol>
<p><span id="more-716"></span></p>
<h3>Part 1: &#8220;About the author&#8221; area</h3>
<p>To do this we&#8217;ll have to filter the default <em>thematic_postheader()</em>. </p>
<p>The code is basically the default postfooter code with some modification, mainly to the <em>//Display author info area</em>. Note the fact that we&#8217;re only displaying the author name, description, image and url inside the single post. On the homepage we&#8217;re still displaying the default thematic post header.</p>
<p>So copy this inside your <em>functions.php</em> file (check out for the opening and closing php tags) and reload the page. You should see on the post page the author area.</p>

<div class="wp_codebox"><table><tr id="p71634"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
</pre></td><td class="code" id="p716code34"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">function</span> postheader_and_author_info<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$id</span><span style="color: #339933;">,</span> <span style="color: #000088;">$post</span><span style="color: #339933;">,</span> <span style="color: #000088;">$authordata</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Create $posteditlink    </span>
    <span style="color: #000088;">$posteditlink</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;a href=&quot;'</span> <span style="color: #339933;">.</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wpurl'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/wp-admin/post.php?action=edit&amp;amp;post='</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$id</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$posteditlink</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&quot; title=&quot;'</span> <span style="color: #339933;">.</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Edit post'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'thematic'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;&gt;'</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$posteditlink</span> <span style="color: #339933;">.=</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Edit'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'thematic'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;/a&gt;'</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>is_single<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> is_page<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$posttitle</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;h1 class=&quot;entry-title&quot;&gt;'</span> <span style="color: #339933;">.</span> get_the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/h1&gt;n&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span>is_404<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>    
        <span style="color: #000088;">$posttitle</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;h1 class=&quot;entry-title&quot;&gt;'</span> <span style="color: #339933;">.</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Not Found'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'thematic'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/h1&gt;n&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$posttitle</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;h2 class=&quot;entry-title&quot;&gt;&lt;a href=&quot;'</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$posttitle</span> <span style="color: #339933;">.=</span> get_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$posttitle</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&quot; title=&quot;'</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$posttitle</span> <span style="color: #339933;">.=</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Permalink to '</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'thematic'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> the_title_attribute<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'echo=0'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$posttitle</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&quot; rel=&quot;bookmark&quot;&gt;'</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$posttitle</span> <span style="color: #339933;">.=</span> get_the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>   
        <span style="color: #000088;">$posttitle</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;/a&gt;&lt;/h2&gt;n&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000088;">$postmeta</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;div class=&quot;entry-meta&quot;&gt;'</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$postmeta</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;span class=&quot;meta-prep meta-prep-author&quot;&gt;'</span> <span style="color: #339933;">.</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'By '</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'thematic'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;/span&gt;'</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$postmeta</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;span class=&quot;author vcard&quot;&gt;'</span><span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;a class=&quot;url fn n&quot; href=&quot;'</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$postmeta</span> <span style="color: #339933;">.=</span> get_author_link<span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #000088;">$authordata</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #000088;">$authordata</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">user_nicename</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$postmeta</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&quot; title=&quot;'</span> <span style="color: #339933;">.</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'View all posts by '</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'thematic'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> get_the_author<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot;&gt;'</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$postmeta</span> <span style="color: #339933;">.=</span> get_the_author<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$postmeta</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;meta-sep meta-sep-entry-date&quot;&gt; | &lt;/span&gt;'</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$postmeta</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;span class=&quot;meta-prep meta-prep-entry-date&quot;&gt;'</span> <span style="color: #339933;">.</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Published: '</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'thematic'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;/span&gt;'</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$postmeta</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;span class=&quot;entry-date&quot;&gt;&lt;abbr class=&quot;published&quot; title=&quot;'</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$postmeta</span> <span style="color: #339933;">.=</span> get_the_time<span style="color: #009900;">&#40;</span>thematic_time_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot;&gt;'</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$postmeta</span> <span style="color: #339933;">.=</span> get_the_time<span style="color: #009900;">&#40;</span>thematic_time_display<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$postmeta</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;/abbr&gt;&lt;/span&gt;'</span><span style="color: #339933;">;</span>
    <span style="color: #666666; font-style: italic;">// Display edit link</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>current_user_can<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'edit_posts'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$postmeta</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">' &lt;span class=&quot;meta-sep meta-sep-edit&quot;&gt;|&lt;/span&gt; '</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;span class=&quot;edit&quot;&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$posteditlink</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;/span&gt;'</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>               
    <span style="color: #000088;">$postmeta</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;/div&gt;&lt;!-- .entry-meta --&gt;n&quot;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
    <span style="color: #000088;">$postmeta_issingle</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;div class=&quot;entry-meta&quot;&gt;'</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$postmeta_issingle</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;span class=&quot;meta-prep meta-prep-entry-date&quot;&gt;'</span> <span style="color: #339933;">.</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Published: '</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'thematic'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;/span&gt;'</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$postmeta_issingle</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;span class=&quot;entry-date&quot;&gt;&lt;abbr class=&quot;published&quot; title=&quot;'</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$postmeta_issingle</span> <span style="color: #339933;">.=</span> get_the_time<span style="color: #009900;">&#40;</span>thematic_time_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot;&gt;'</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$postmeta_issingle</span> <span style="color: #339933;">.=</span> get_the_time<span style="color: #009900;">&#40;</span>thematic_time_display<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$postmeta_issingle</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;/abbr&gt;&lt;/span&gt;'</span><span style="color: #339933;">;</span>
    <span style="color: #666666; font-style: italic;">// Display edit link</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>current_user_can<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'edit_posts'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$postmeta_issingle</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">' &lt;span class=&quot;meta-sep meta-sep-edit&quot;&gt;|&lt;/span&gt; '</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;span class=&quot;edit&quot;&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$posteditlink</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;/span&gt;'</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>               
    <span style="color: #000088;">$postmeta_issingle</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;/div&gt;&lt;!-- .entry-meta --&gt;n&quot;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
	<span style="color: #666666; font-style: italic;">//Display author info area</span>
	<span style="color: #000088;">$postauthor</span> <span style="color: #339933;">.=</span><span style="color: #0000ff;">'&lt;div id=&quot;author-info&quot; class=&quot;vcard&quot;&gt;'</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$postauthor</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;h2 class=&quot;entry-title&quot;&gt;&lt;span class=&quot;meta-prep meta-prep-author&quot;&gt;'</span> <span style="color: #339933;">.</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'By '</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'thematic'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;/span&gt;'</span><span style="color: #339933;">;</span>	
	<span style="color: #000088;">$postauthor</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;span class=&quot;author vcard&quot;&gt;'</span><span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;a class=&quot;url fn n&quot; href=&quot;'</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$postauthor</span> <span style="color: #339933;">.=</span> get_author_link<span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #000088;">$authordata</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #000088;">$authordata</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">user_nicename</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$postauthor</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&quot; title=&quot;'</span> <span style="color: #339933;">.</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'View all posts by '</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'thematic'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> get_the_author<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot;&gt;'</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$postauthor</span> <span style="color: #339933;">.=</span> get_the_author<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$postauthor</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;'</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$email</span> <span style="color: #339933;">=</span> get_the_author_email<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$postauthor</span> <span style="color: #339933;">.=</span> <a href="http://www.php.net/str_replace"><span style="color: #990000;">str_replace</span></a><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;class='avatar&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;class='photo avatar&quot;</span><span style="color: #339933;">,</span> get_avatar<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$email</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$postauthor</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;div class=&quot;author-bio note&quot;&gt;&lt;p&gt;'</span> <span style="color: #339933;">.</span> get_the_author_description<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;/p&gt;&lt;/div&gt;'</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$postauthor</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;div class=&quot;author-url&quot;&gt;&lt;a href=&quot;'</span> <span style="color: #339933;">.</span> get_the_author_url<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot;&gt;Website&lt;/a&gt;&lt;/div&gt;'</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$postauthor</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;/div&gt;'</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
&nbsp;
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_type</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'page'</span> <span style="color: #339933;">||</span> is_404<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$postheader</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$posttitle</span><span style="color: #339933;">;</span>        
    <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$postheader</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$posttitle</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$postmeta</span><span style="color: #339933;">;</span>    
    <span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>is_single<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$postheader</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$posttitle</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$postmeta_issingle</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$postauthor</span><span style="color: #339933;">;</span>   
	<span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$postheader</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'thematic_postheader'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'postheader_and_author_info'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Next we need to style it. Add this css to the <em>style.css</em>of your child theme.</p>

<div class="wp_codebox"><table><tr id="p71635"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
</pre></td><td class="code" id="p716code35"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#content</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#main</span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span><span style="color: #993333;">visible</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #808080; font-style: italic;">/* Author Area Styling */</span>
<span style="color: #cc00cc;">#author-info</span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">18px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#ffffcc</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">dashed</span> <span style="color: #cc00cc;">#e8e89b</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border-left</span><span style="color: #00AA00;">:</span><span style="color: #933;">20px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#e8e89b</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span> <span style="color: #933;">40px</span> <span style="color: #933;">10px</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">18px</span> <span style="color: #933;">0px</span> <span style="color: #933;">18px</span> <span style="color: #933;">-40px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">13px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.author</span> <span style="color: #cc00cc;">#author-info</span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#author-info</span> .entry-title<span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">14px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">text-transform</span><span style="color: #00AA00;">:</span><span style="color: #993333;">uppercase</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span><span style="color: #993333;">normal</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#111</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#author-info</span> .meta-prep-author<span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">text-transform</span><span style="color: #00AA00;">:</span><span style="color: #993333;">lowercase</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#author-info</span> <span style="color: #6666ff;">.author-bio</span> p<span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;">19px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#author-info</span> .avatar<span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">70px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">70px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">4px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
	box-shadow<span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #933;">1px</span> <span style="color: #933;">1px</span> <span style="color: #cc00cc;">#cbcbcb</span><span style="color: #00AA00;">;</span>
	-moz-box-shadow<span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #933;">1px</span> <span style="color: #933;">1px</span> <span style="color: #cc00cc;">#cbcbcb</span><span style="color: #00AA00;">;</span>
	-webkit-box-shadow<span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #933;">1px</span> <span style="color: #933;">1px</span> <span style="color: #cc00cc;">#cbcbcb</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<h3>Part 2: Author archives</h3>
<p>By default Thematic doesn&#8217;t come with the author bio activated. If we go to <em>Appearance->Thematic Options</em> in the WordPress backend, we can activate it there by clicking the unchecked check box <img src='http://www.cozmoslabs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p><img src="http://www.cozmoslabs.com/wp-content/uploads/2009/10/info_on_author_page.jpg" alt="info_on_author_page" title="info_on_author_page" width="600" height="304" class="aligncenter size-full wp-image-732" /></p>
<p>However we want some elements from that page changed. More exactly we don&#8217;t want the email address to be shown publicly (although Thematic passes it through <em>antispambot</em> &#8220;fool&#8221; e-mail harvesters) and we also want to display the author&#8217;s website link similar to what we have on the single post page.</p>
<p>As a bonus we will display the author&#8217;s posts in a different way so it&#8217;s a lot easier to find what we&#8217;re interested in. The idea is that instead of listing all the posts in chronological order we&#8217;ll order them by category. You can see what I mean in the <a href="http://www.cozmoslabs.com/projects/author/author/admin/">Author Archives Page.</a></p>
<p>This time we won&#8217;t make the changes to the <em>functions.php</em> file as we would normally do with any thematic child theme. Instead we&#8217;ll have to create a new <em>author.php</em> file and place it inside our child theme so we can overwrite the default Thematic functionality. </p>
<p>The reason we&#8217;re making the changes to the template file instead of inside <em>functions.php</em> is that there is no filter on the Author Info Area and instead the code is directly inside the template file. As a side note I think the author template and the search template are the only ones that still have actual code inside them. For anything else you can pretty much hook or filter your way inside functions.php.</p>
<p>So now to the <em>authors.php</em> code.</p>

<div class="wp_codebox"><table><tr id="p71636"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
</pre></td><td class="code" id="p716code36"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$options</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$options</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>get_option<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">===</span> <span style="color: #009900; font-weight: bold;">FALSE</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'std'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> get_option<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> get_header<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
	<span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;container&quot;</span><span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;content&quot;</span><span style="color: #339933;">&gt;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_post<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
            <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #666666; font-style: italic;">//thematic_page_title() </span>
            	  <span style="color: #666666; font-style: italic;">//We've commented out the Thematic Page title since that info will be displayed in our Author area</span>
            <span style="color: #000000; font-weight: bold;">?&gt;</span>		
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #666666; font-style: italic;">/* if display author bio is selected */</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$thm_authorinfo</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'true'</span> <span style="color: #339933;">&amp;</span> <span style="color: #339933;">!</span>is_paged<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
			<span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;author-info&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;vcard&quot;</span><span style="color: #339933;">&gt;</span>
			    <span style="color: #339933;">&lt;</span>h2 <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;entry-title&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Author Archives: '</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'thematic'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;</span>strong<span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$authordata</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">first_name</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$authordata</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">last_name</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>strong<span style="color: #339933;">&gt;&lt;/</span>h2<span style="color: #339933;">&gt;</span> 
    			<span style="color: #000000; font-weight: bold;">&lt;?php</span> thematic_author_info_avatar<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    			<span style="color: #339933;">&lt;</span>div <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;author-bio note&quot;</span><span style="color: #339933;">&gt;</span>
                    <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #339933;">==</span> <span style="color: #000088;">$authordata</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">user_description</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #b1b100;">echo</span> apply_filters<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'archive_meta'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$authordata</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">user_description</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
                <span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span>  			
    			<span style="color: #339933;">&lt;</span>div <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;author-url&quot;</span><span style="color: #339933;">&gt;&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php the_author_url() ?&gt;&quot;</span><span style="color: #339933;">&gt;</span>Website<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>div<span style="color: #339933;">&gt;</span>
			<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #666666; font-style: italic;">#author-info --&gt;
</span><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #339933;">&lt;</span>div <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;entry-content&quot;</span><span style="color: #339933;">&gt;</span>	
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #666666; font-style: italic;">//thematic_author_loop() - we won't use the default thematic author loop</span>
	  <span style="color: #666666; font-style: italic;">//instead will list the post sorted by category		</span>
			<span style="color: #000088;">$categories</span> <span style="color: #339933;">=</span> get_categories<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$categories</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$category</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
				<span style="color: #000088;">$cat_id</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$category</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">cat_ID</span><span style="color: #339933;">;</span>
				<span style="color: #000088;">$cat_slug</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$category</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">category_nicename</span><span style="color: #339933;">;</span>
				<span style="color: #000088;">$cat_name</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$category</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">cat_name</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
				<span style="color: #666666; font-style: italic;">//The Query</span>
				query_posts<span style="color: #009900;">&#40;</span><a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span>
					<span style="color: #0000ff;">'category__in'</span><span style="color: #339933;">=&gt;</span>	<span style="color: #000088;">$cat_id</span><span style="color: #339933;">,</span>
					<span style="color: #0000ff;">'author'</span> <span style="color: #339933;">=&gt;</span>			<span style="color: #000088;">$authordata</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span>
					<span style="color: #0000ff;">'posts_per_page'</span><span style="color: #339933;">=&gt;</span>	<span style="color: #cc66cc;">100</span>
					<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
				<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
					<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;h2&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$cat_name</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;/h2&gt;'</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
&nbsp;
				<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;ul&gt;'</span><span style="color: #339933;">;</span>
				<span style="color: #666666; font-style: italic;">//The Loop</span>
				<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span> have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> the_post<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
				<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php the_permalink(); ?&gt;&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
&nbsp;
				<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span>
				<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;/ul&gt;'</span><span style="color: #339933;">;</span>
&nbsp;
				<span style="color: #666666; font-style: italic;">//Reset Query</span>
				wp_reset_query<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
 <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span>	
&nbsp;
		<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #666666; font-style: italic;">#content --&gt;
</span>	<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;&lt;!--</span> <span style="color: #666666; font-style: italic;">#container --&gt;
</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> thematic_sidebar<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> get_footer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<h2>Conclusions</h2>
<p>So we added an author area on our single post page, enabled and modified the author area on the author archives page and as a bonus modified the default loop to list all the posts of the author organized under categories. </p>
<p>If you don&#8217;t like to do a lot of copy paste you can just download the Author Child Theme. Enjoy! </p>
<p class="info-box">
In order to install it you have to download the <a href="http://themeshaper.com/thematic/">Thematic Theme</a> (from which this child theme inherits all of the functionality), upload both themes (Author Template Child Theme and Thematic) to your server in the themes folder AND THEN ACTIVATE the Author Template Child Theme.
</p>
<div class="preview_download">
<a href="http://www.cozmoslabs.com/projects/author/author/admin/"><img src="http://www.cozmoslabs.com/wp-content/uploads/2009/10/preview.gif" alt="preview"/></a><a class="downloadlink dlimg" href="http://www.cozmoslabs.com/wp-content/plugins/download-monitor/download.php?id=9" title="Version 1.0 downloaded 148 times" ><img src="http://www.cozmoslabs.com/wp-content/plugins/download-monitor/img/download.gif" alt="Download Author Child Theme Version 1.0" /></a>
</div>


<p>Related posts:<ol><li><a href='http://www.cozmoslabs.com/2009/06/26/thematic-featured-posts/' rel='bookmark' title='Permanent Link: Add &#8220;Featured Posts&#8221; to your Thematic child theme'>Add &#8220;Featured Posts&#8221; to your Thematic child theme</a></li>
<li><a href='http://www.cozmoslabs.com/2009/07/07/how-to-create-a-wordpress-theme/' rel='bookmark' title='Permanent Link: How To Create a WordPress Theme &#8211; a tutorial series by Ian Stewart'>How To Create a WordPress Theme &#8211; a tutorial series by Ian Stewart</a></li>
<li><a href='http://www.cozmoslabs.com/2008/12/17/replacing-the-thematic-menu-with-a-dropdown-list-of-categories/' rel='bookmark' title='Permanent Link: Replacing the Thematic Menu with a DropDown List of Categories'>Replacing the Thematic Menu with a DropDown List of Categories</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.cozmoslabs.com/2009/10/28/create-an-about-the-author-area-for-thematic/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Awesome Thematic Templates</title>
		<link>http://www.cozmoslabs.com/2009/07/31/awesome-thematic-templates/</link>
		<comments>http://www.cozmoslabs.com/2009/07/31/awesome-thematic-templates/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 12:19:13 +0000</pubDate>
		<dc:creator>Cristian</dc:creator>
				<category><![CDATA[Thematic]]></category>
		<category><![CDATA[log in]]></category>
		<category><![CDATA[register]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://www.cozmoslabs.com/?p=650</guid>
		<description><![CDATA[Did you ever think about page templates for user registration and log in? Well, we have. Justin&#8217;s Hybrid has them, Thematic doesn&#8217;t. So we&#8217;ve taken the Hybrid templates, adapted them for Thematic, and guess what? They&#8217;re working like a charm. Just upload them to your child theme directory and enjoy. Get’em while they’re hot! No [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Did you ever think about page templates for user registration and log in? Well, we have. Justin&#8217;s <a href="http://themehybrid.com/">Hybrid</a> has them, Thematic doesn&#8217;t. So we&#8217;ve taken the Hybrid templates, adapted them for Thematic, and guess what? They&#8217;re working like a charm. Just upload them to your child theme directory and enjoy.</p>
<p>Get’em while they’re hot!</p>
<p class="preview_download"><a class="downloadlink dlimg" href="http://www.cozmoslabs.com/wp-content/plugins/download-monitor/download.php?id=8" title="Version 0.1 downloaded 1154 times" ><img src="http://www.cozmoslabs.com/wp-content/plugins/download-monitor/img/download.gif" alt="Download Awesome Templates Version 0.1" /></a></p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.cozmoslabs.com/2009/07/31/awesome-thematic-templates/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Early Morning Child Theme</title>
		<link>http://www.cozmoslabs.com/2009/07/20/early-morning-child-theme/</link>
		<comments>http://www.cozmoslabs.com/2009/07/20/early-morning-child-theme/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 10:54:25 +0000</pubDate>
		<dc:creator>Cristian</dc:creator>
				<category><![CDATA[Recomended Reading]]></category>
		<category><![CDATA[Thematic]]></category>
		<category><![CDATA[Theme Design]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[child theme]]></category>
		<category><![CDATA[thematic child theme]]></category>
		<category><![CDATA[wordpress theme design]]></category>

		<guid isPermaLink="false">http://www.cozmoslabs.com/?p=620</guid>
		<description><![CDATA[This elegant WordPress theme was inspired by the colors of the early morning as I see them from my window. It&#8217;s light, elegant and pleasantly surprising. This theme doesn&#8217;t scream at you, instead it takes a step back and lets the user read. Please don&#8217;t spoil it by putting ads on it! You also have [...]


Related posts:<ol><li><a href='http://www.cozmoslabs.com/2009/04/07/green-anyone-try-commune-thematic-child-theme/' rel='bookmark' title='Permanent Link: <span style="color:#7fae52">Green anyone?</span> Try Commune &#8211; Thematic Child Theme!'><span style="color:#7fae52">Green anyone?</span> Try Commune &#8211; Thematic Child Theme!</a></li>
<li><a href='http://www.cozmoslabs.com/2009/06/02/street-wordpress-theme/' rel='bookmark' title='Permanent Link: Street WordPress Theme'>Street WordPress Theme</a></li>
<li><a href='http://www.cozmoslabs.com/2010/06/04/charisma-free-genesis-child-theme/' rel='bookmark' title='Permanent Link: Charisma, Free Genesis Child Theme'>Charisma, Free Genesis Child Theme</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This elegant WordPress theme was inspired by the colors of the early morning as I see them from my window. It&#8217;s light, elegant and pleasantly surprising.</p>
<p>This theme doesn&#8217;t scream at you, instead it takes a step back and lets the user read. Please don&#8217;t spoil it by putting ads on it!</p>
<div id="attachment_624" class="wp-caption aligncenter" style="width: 610px"><img src="http://www.cozmoslabs.com/wp-content/uploads/2009/07/early-morning1.jpg" alt="Early Morning - A refreshing child theme for Thematic" title="early-morning" width="600" height="326" class="size-full wp-image-624" /><p class="wp-caption-text">Early Morning - A refreshing child theme for Thematic</p></div>
<p><span id="more-620"></span></p>
<h2>You also have some nifty options:</h2>
<ul>
<li>You can upload your own logo</li>
<li>It comes with it&#8217;s own custom designed Twitter widget, so your visitors can see what you&#8217;re doing from your blog</li>
<li>If green isn&#8217;t your style, it comes with 5 background options that you can select from the <strong>Early Morning Theme Options</strong> (Green, Turquoise, Brick Red, Gray and Black)</li>
<li>Has a one column page template and archive template</li>
<li>It&#8217;s been tested and works on Firefox 3.5, Safari 4, Opera 9, Chrome, IE7, IE8</li>
</ul>
<p class="info-box">
In order to install it you have to download the <a href="http://themeshaper.com/thematic/">Thematic Theme</a> (from which this child theme inherits all of the functionality), upload both themes (Early Morning and Thematic) to your server in the themes folder AND THEN ACTIVATE the Early Morning Theme.
</p>
<div class="preview_download">
<a href="http://www.cozmoslabs.com/projects/early/"><img src="http://www.cozmoslabs.com/wp-content/uploads/2009/07/preview.gif" alt="preview"/></a><a class="downloadlink dlimg" href="http://www.cozmoslabs.com/wp-content/plugins/download-monitor/download.php?id=7" title="Version 0.2 downloaded 4957 times" ><img src="http://www.cozmoslabs.com/wp-content/plugins/download-monitor/img/download.gif" alt="Download Early Morning Version 0.2" /></a>
</div>
<div class="preview_download">
Inspired by: <a href="http://www.adrianpelletier.com/">Adrian Pelletier</a>
</div>


<p>Related posts:<ol><li><a href='http://www.cozmoslabs.com/2009/04/07/green-anyone-try-commune-thematic-child-theme/' rel='bookmark' title='Permanent Link: <span style="color:#7fae52">Green anyone?</span> Try Commune &#8211; Thematic Child Theme!'><span style="color:#7fae52">Green anyone?</span> Try Commune &#8211; Thematic Child Theme!</a></li>
<li><a href='http://www.cozmoslabs.com/2009/06/02/street-wordpress-theme/' rel='bookmark' title='Permanent Link: Street WordPress Theme'>Street WordPress Theme</a></li>
<li><a href='http://www.cozmoslabs.com/2010/06/04/charisma-free-genesis-child-theme/' rel='bookmark' title='Permanent Link: Charisma, Free Genesis Child Theme'>Charisma, Free Genesis Child Theme</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.cozmoslabs.com/2009/07/20/early-morning-child-theme/feed/</wfw:commentRss>
		<slash:comments>109</slash:comments>
		</item>
		<item>
		<title>Add &#8220;Featured Posts&#8221; to your Thematic child theme</title>
		<link>http://www.cozmoslabs.com/2009/06/26/thematic-featured-posts/</link>
		<comments>http://www.cozmoslabs.com/2009/06/26/thematic-featured-posts/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 13:35:54 +0000</pubDate>
		<dc:creator>Cristian</dc:creator>
				<category><![CDATA[Thematic]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[child theme]]></category>
		<category><![CDATA[featured posts]]></category>

		<guid isPermaLink="false">http://www.cozmoslabs.com/?p=557</guid>
		<description><![CDATA[Featured posts are common in WordPress magazine themes. They let you promote hot topics and bring your best articles right in front of your users. First thing we need to do is create a thematic child theme. This way we won’t make direct changes to Thematic. The featured posts will be inserted on the home [...]


Related posts:<ol><li><a href='http://www.cozmoslabs.com/2009/06/02/street-wordpress-theme/' rel='bookmark' title='Permanent Link: Street WordPress Theme'>Street WordPress Theme</a></li>
<li><a href='http://www.cozmoslabs.com/2010/02/10/exclude-posts-from-wordpress-navigation-in-thematic/' rel='bookmark' title='Permanent Link: Exclude posts from WordPress Navigation in Thematic'>Exclude posts from WordPress Navigation in Thematic</a></li>
<li><a href='http://www.cozmoslabs.com/2008/10/29/installing-wordpress-child-themes-customizing/' rel='bookmark' title='Permanent Link: Installing WordPress Child Themes and Customizing the Byty Theme'>Installing WordPress Child Themes and Customizing the Byty Theme</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div id="attachment_565" class="wp-caption alignright" style="width: 310px"><img src="http://www.cozmoslabs.com/wp-content/uploads/2009/04/featured_posts.jpg" alt="Featured Posts for Thematic" title="featured_posts" width="300" height="200" class="size-full wp-image-565" /><p class="wp-caption-text">Featured Posts for Thematic</p></div>
<p>Featured posts are common in WordPress magazine themes. They let you promote hot topics and bring your best articles right in front of your users. </p>
<p>First thing we need to do is create a <a href="http://www.cozmoslabs.com/2008/09/07/use-wordpress-as-a-cms-with-thematic-part1/">thematic child theme</a>. This way we won’t make direct changes to <a href="http://themeshaper.com/thematic/">Thematic</a>.</p>
<p>The featured posts will be inserted on the home page before the rest of the articles. We&#8217;ll display the latest 3 posts which are tagged &#8216;featured&#8217;. </p>
<p class="preview_download"><a href="http://www.cozmoslabs.com/projects/wp/?theme=featured" target="_blank"><img src="http://www.cozmoslabs.com/wp-content/plugins/download-monitor/img/preview.gif" border="0" alt="preview thematic child theme" /></a></p>
<p><span id="more-557"></span></p>
<p>We now have to add the code inside of functions.php file of your child theme (don&#8217;t forget the <em><&#63;php</em> opening tag and the <em>&#63;></em> ending tag).</p>
<pre class="brush: php;">
function featured_posts(){

		$my_query = new WP_Query('tag=featured&amp;showposts=3');

		echo '&lt;ul id=&quot;featured-posts&quot;&gt;';
		$feat_class = array();

		while ($my_query-&gt;have_posts()) : $my_query-&gt;the_post();
				$feat_class = array();
				// Category for the post queried
				foreach ( (array) get_the_category() as $cat )
					$feat_class[] = 'category-' . $cat-&gt;slug;
					$feat_class = join(&quot; &quot;, $feat_class);
				?&gt;
				&lt;li id=&quot;featured-&lt;?php the_ID(); ?&gt;&quot; class=&quot;&lt;?php echo $feat_class; ?&gt;&quot;&gt;
					&lt;?php
						$posttitle = '&lt;h4&gt;&lt;a href=&quot;';
						$posttitle .= get_permalink();
						$posttitle .= '&quot; title=&quot;';
						$posttitle .= __('Permalink to ', 'thematic') . the_title_attribute('echo=0');
						$posttitle .= '&quot; rel=&quot;bookmark&quot;&gt;';
						$posttitle .= get_the_title();
						$posttitle .= &quot;&lt;/a&gt;&lt;/h4&gt;\n&quot;;
						echo $posttitle;

						the_excerpt();
					?&gt;

				&lt;/li&gt;&lt;!-- .post --&gt;
		&lt;?php
		endwhile;
		echo '&lt;/ul&gt;';
}
add_action('thematic_above_indexloop','featured_posts');
</pre>
<p>The first line <em>$my_query = new WP_Query(&#8216;tag=featured&#038;showposts=3&#8242;);</em> defines the name of the tag that targets your posts (you can have any tag name there) and the number of featured articles (three in this case).</p>
<p>Right now it&#8217;s just a list of posts so a bit of css styling is in order to make it look attractive to your visitors. Add this css to your style.css file inside the Child Theme.</p>
<pre class="brush: css;">
ul#featured-posts {
    float: left;
    margin: 0;
    padding: 0 0 15px 0;
    list-style: none;
    color: #111;
    font-size: 11px;
    line-height:14px;
    font-family: Helvetica, Arial, sans-serif;
}
#featured-posts li {
    float: left;
    width: 135px;
    padding: 12px 10px 10px 10px;
    margin-right: 15px;
    min-height: 260px;
    background:#f1f1f1;
    border:3px double #ccc;
}

#featured-posts li p {
    margin: 0;
    padding: 0;
}

#featured-posts li:hover {
    background:#fff;
}
#featured-posts li h4 a {
    font-family:Georgia, Times, sans-serif;
    font-size: 12px;
    line-height: 13px;
    display: block;
    padding: 5px 1px;
    color: #111;
    font-weight: bold;
}
</pre>
<p>I hope you find it useful and don&#8217;t hesitate to post in the comments were you&#8217;ve used this.</p>


<p>Related posts:<ol><li><a href='http://www.cozmoslabs.com/2009/06/02/street-wordpress-theme/' rel='bookmark' title='Permanent Link: Street WordPress Theme'>Street WordPress Theme</a></li>
<li><a href='http://www.cozmoslabs.com/2010/02/10/exclude-posts-from-wordpress-navigation-in-thematic/' rel='bookmark' title='Permanent Link: Exclude posts from WordPress Navigation in Thematic'>Exclude posts from WordPress Navigation in Thematic</a></li>
<li><a href='http://www.cozmoslabs.com/2008/10/29/installing-wordpress-child-themes-customizing/' rel='bookmark' title='Permanent Link: Installing WordPress Child Themes and Customizing the Byty Theme'>Installing WordPress Child Themes and Customizing the Byty Theme</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.cozmoslabs.com/2009/06/26/thematic-featured-posts/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>Street WordPress Theme</title>
		<link>http://www.cozmoslabs.com/2009/06/02/street-wordpress-theme/</link>
		<comments>http://www.cozmoslabs.com/2009/06/02/street-wordpress-theme/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 16:45:00 +0000</pubDate>
		<dc:creator>Cristian</dc:creator>
				<category><![CDATA[Thematic]]></category>
		<category><![CDATA[Theme Design]]></category>
		<category><![CDATA[child theme]]></category>
		<category><![CDATA[street]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.cozmoslabs.com/?p=500</guid>
		<description><![CDATA[Street is something that was created from a spark of inspiration, something that I felt should look like this. This wasn&#8217;t thought out nor planed. It uses the beautiful Vegur Free Font for the headings and main menu, implemented by Cufon (text replacement technique). I&#8217;ve spent a great deal of time searching for the perfect [...]


Related posts:<ol><li><a href='http://www.cozmoslabs.com/2009/06/26/thematic-featured-posts/' rel='bookmark' title='Permanent Link: Add &#8220;Featured Posts&#8221; to your Thematic child theme'>Add &#8220;Featured Posts&#8221; to your Thematic child theme</a></li>
<li><a href='http://www.cozmoslabs.com/2008/10/29/installing-wordpress-child-themes-customizing/' rel='bookmark' title='Permanent Link: Installing WordPress Child Themes and Customizing the Byty Theme'>Installing WordPress Child Themes and Customizing the Byty Theme</a></li>
<li><a href='http://www.cozmoslabs.com/2008/10/25/byty-free-child-theme-built-thematic/' rel='bookmark' title='Permanent Link: Byty the Free Child Theme &#8211; Built on Thematic'>Byty the Free Child Theme &#8211; Built on Thematic</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Street is something that was created from a spark of inspiration, something that I felt should look like this. This wasn&#8217;t thought out nor planed.</p>
<p>It uses the beautiful <a href="http://www.dotcolon.net/font/font.php?id=1">Vegur Free Font</a> for the headings and main menu, implemented by <a href="http://wiki.github.com/sorccu/cufon/about">Cufon</a> (text replacement technique). I&#8217;ve spent a great deal of time searching for the perfect free font for this theme, but I think I found the right combination.</p>
<p>While this child theme is just a skin for <a href="http://themeshaper.com/thematic/">Thematic</a>, because this exact reason is also functional. You have access to all 13 Widget Areas <strong>Thematic</strong> uses, the semantically correct HTML that is great for SEO, can use a page template that spans the entire width of the page without the sidebars and even you can <strong>upload your own logo or header image</strong> from the &#8220;Street Theme Options&#8221;.</p>
<p class="preview_download"><a href="http://cozmoslabs.com/projects/street/" target="_blank"><img src="http://www.cozmoslabs.com/wp-content/uploads/2009/06/preview.gif" border="0" alt="preview thematic child theme" /></a> <a class="downloadlink dlimg" href="http://www.cozmoslabs.com/wp-content/plugins/download-monitor/download.php?id=5" title="Version 0.1 downloaded 4140 times" ><img src="http://www.cozmoslabs.com/wp-content/plugins/download-monitor/img/download.gif" alt="Download Street Child Theme for Thematic Version 0.1" /></a></p>
<div id="attachment_505" class="wp-caption aligncenter" style="width: 610px"><img class="size-full wp-image-505" title="street_theme" src="http://www.cozmoslabs.com/wp-content/uploads/2009/06/street_theme.gif" alt="street_theme" width="600" height="395" /><p class="wp-caption-text">An elegant Child Theme for Thematic</p></div>
<p>I hope you&#8217;ll enjoy using this theme as much I enjoyed creating it!</p>
<p class="info-box">
In order to install it you have to download the <a href="http://themeshaper.com/thematic/">Thematic Theme</a> (from which this child theme inherits all of the functionality), upload both themes (Street and Thematic) to your server in the themes folder AND THEN ACTIVATE the Street theme.</p>


<p>Related posts:<ol><li><a href='http://www.cozmoslabs.com/2009/06/26/thematic-featured-posts/' rel='bookmark' title='Permanent Link: Add &#8220;Featured Posts&#8221; to your Thematic child theme'>Add &#8220;Featured Posts&#8221; to your Thematic child theme</a></li>
<li><a href='http://www.cozmoslabs.com/2008/10/29/installing-wordpress-child-themes-customizing/' rel='bookmark' title='Permanent Link: Installing WordPress Child Themes and Customizing the Byty Theme'>Installing WordPress Child Themes and Customizing the Byty Theme</a></li>
<li><a href='http://www.cozmoslabs.com/2008/10/25/byty-free-child-theme-built-thematic/' rel='bookmark' title='Permanent Link: Byty the Free Child Theme &#8211; Built on Thematic'>Byty the Free Child Theme &#8211; Built on Thematic</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.cozmoslabs.com/2009/06/02/street-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>77</slash:comments>
		</item>
		<item>
		<title>Add a header image to Thematic &#8211; the easy way</title>
		<link>http://www.cozmoslabs.com/2009/05/28/add-a-header-image-to-thematic-the-easy-way/</link>
		<comments>http://www.cozmoslabs.com/2009/05/28/add-a-header-image-to-thematic-the-easy-way/#comments</comments>
		<pubDate>Thu, 28 May 2009 21:48:48 +0000</pubDate>
		<dc:creator>Cristian</dc:creator>
				<category><![CDATA[Thematic]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[child theme]]></category>
		<category><![CDATA[logo]]></category>
		<category><![CDATA[thematic header image]]></category>

		<guid isPermaLink="false">http://www.cozmoslabs.com/?p=471</guid>
		<description><![CDATA[With the various theme hooks and theme filters, now it&#8217;s easier then ever to change the Thematic header with your own logo or custom banner design. Until now you had to either change the header.php file in Thematic (something not really recommended) or use rather ugly CSS tricks to hide the existing content and use [...]


Related posts:<ol><li><a href='http://www.cozmoslabs.com/2009/04/15/add-a-search-box-to-the-thematic-menu/' rel='bookmark' title='Permanent Link: Add a search box to the thematic menu'>Add a search box to the thematic menu</a></li>
<li><a href='http://www.cozmoslabs.com/2009/06/26/thematic-featured-posts/' rel='bookmark' title='Permanent Link: Add &#8220;Featured Posts&#8221; to your Thematic child theme'>Add &#8220;Featured Posts&#8221; to your Thematic child theme</a></li>
<li><a href='http://www.cozmoslabs.com/2010/05/02/thematic-tabbed-widgets/' rel='bookmark' title='Permanent Link: Thematic Tabbed Widgets'>Thematic Tabbed Widgets</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>With the various <em>theme hooks</em> and <em>theme filters</em>, now it&#8217;s easier then ever to <strong>change the <a href="http://themeshaper.com/thematic/">Thematic</a> header</strong> with your own logo or custom banner design. </p>
<p>Until now you had to either change the header.php file in Thematic (something not really recommended) or <a href="http://www.cozmoslabs.com/2008/10/29/installing-wordpress-child-themes-customizing/">use rather ugly CSS tricks</a> to hide the existing content and use your logo or banner as a background for the <em>#header</em> or <em>#branding</em> div.</p>
<p>The end result will be a <strong>Child Theme Options page</strong> that will allow us to select if we want to use the default header or upload a header image:<br />
<div id="attachment_473" class="wp-caption aligncenter" style="width: 610px"><img src="http://www.cozmoslabs.com/wp-content/uploads/2009/05/Untitled-2.jpg" alt="Child Theme Options Page - You now have the posibility to upload your header image from WordPress" title="Untitled-2" width="600" height="354" class="size-full wp-image-473" /><p class="wp-caption-text">Child Theme Options Page - You now have the posibility to upload your header image from WordPress</p></div></p>
<p><span id="more-471"></span></p>
<p>We&#8217;ll start by <a href="http://www.cozmoslabs.com/2008/09/07/use-wordpress-as-a-cms-with-thematic-part1/">creating a Child Theme</a>. If you are already using one of the <a href="http://www.cozmoslabs.com/wordpress-themes/">Thematic Child Themes</a> then you can move to the next step, modifying the <em>functions.php</em> file.</p>
<p>The code for this tutorial was created by my colleague <a href="http://gab.ro/" rel="nofollow">Gabriel</a>. He always helps me with custom programing for WordPress <img src='http://www.cozmoslabs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> !</p>
<p>This <em>functions.php</em> file will consist of two parts: adding the Child Theme Options page to WordPress and replacing the default header with your own logo or banner image.</p>
<p>Open functions.php and add the following code:</p>
<pre class="brush: php;">
&lt;?php
// ---------- &quot;Child Theme Options&quot; menu STARTS HERE

add_action('admin_menu' , 'childtheme_add_admin');

function childtheme_add_admin() {
	add_submenu_page('themes.php', 'Child Theme Options', 'Child Theme Options', 'edit_themes', basename(__FILE__), 'childtheme_admin');
}

function childtheme_admin() {

	$child_theme_image = get_option('child_theme_image');
	$enabled = get_option('child_theme_logo_enabled');

	if ($_POST['options-submit']){
		$enabled = htmlspecialchars($_POST['enabled']);
		update_option('child_theme_logo_enabled', $enabled);

		$file_name = $_FILES['logo_image']['name'];
		$temp_file = $_FILES['logo_image']['tmp_name'];
		$file_type = $_FILES['logo_image']['type'];

		if($file_type==&quot;image/gif&quot; || $file_type==&quot;image/jpeg&quot; || $file_type==&quot;image/pjpeg&quot; || $file_type==&quot;image/png&quot;){
			$fd = fopen($temp_file,’rb’);
			$file_content=file_get_contents($temp_file);
			fclose($fd);

			$wud = wp_upload_dir();

			if (file_exists($wud[path].'/'.strtolower($file_name))){
				unlink ($wud[path].'/'.strtolower($file_name));
			}

			$upload = wp_upload_bits( $file_name, '', $file_content);
		//	echo $upload['error'];

			$child_theme_image = $wud[url].'/'.strtolower($file_name);
			update_option('child_theme_image', $child_theme_image);
		}

		?&gt;
			&lt;div class=&quot;updated&quot;&gt;&lt;p&gt;Your new options have been successfully saved.&lt;/p&gt;&lt;/div&gt;
		&lt;?php

	}

	if($enabled) $checked='checked=&quot;checked&quot;';

	?&gt;
		&lt;div class=&quot;wrap&quot;&gt;
			&lt;div id=&quot;icon-themes&quot; class=&quot;icon32&quot;&gt;&lt;/div&gt;
			&lt;h2&gt;Child Theme Options&lt;/h2&gt;
			&lt;form name=&quot;theform&quot; method=&quot;post&quot; enctype=&quot;multipart/form-data&quot; action=&quot;&lt;?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']);?&gt;&quot;&gt;
				&lt;table class=&quot;form-table&quot;&gt;
					&lt;tr&gt;
						&lt;td width=&quot;200&quot;&gt;Use logo image instead of blog title and description:&lt;/td&gt;
						&lt;td&gt;&lt;input type=&quot;checkbox&quot; name=&quot;enabled&quot; value=&quot;1&quot; &lt;?php echo $checked; ?&gt;/&gt;&lt;/td&gt;
					&lt;/tr&gt;
					&lt;tr&gt;
						&lt;td&gt;Current image:&lt;/td&gt;
						&lt;td&gt;&lt;img src=&quot;&lt;?php echo $child_theme_image; ?&gt;&quot; /&gt;&lt;/td&gt;
					&lt;/tr&gt;
					&lt;tr&gt;
						&lt;td&gt;Logo image to use (gif/jpeg/png):&lt;/td&gt;
						&lt;td&gt;&lt;input type=&quot;file&quot; name=&quot;logo_image&quot;&gt;&lt;br /&gt;(you must have writing permissions for your uploads directory)&lt;/td&gt;
					&lt;/tr&gt;
				&lt;/table&gt;
				&lt;input type=&quot;hidden&quot; name=&quot;options-submit&quot; value=&quot;1&quot; /&gt;
				&lt;p class=&quot;submit&quot;&gt;&lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Save Options&quot; /&gt;&lt;/p&gt;
			&lt;/form&gt;
		&lt;/div&gt;
	&lt;?php
}

// ---------- &quot;Child Theme Options&quot; menu ENDS HERE

// ---------- Adding the logo image to the header STARTS HERE

if(get_option('child_theme_logo_enabled')){
	function remove_thematic_blogtitle() {
	 remove_action('thematic_header','thematic_blogtitle',3);
	}
	add_action('init','remove_thematic_blogtitle');

	function remove_thematic_blogdescription() {
	 remove_action('thematic_header','thematic_blogdescription',5);
	}
	add_action('init','remove_thematic_blogdescription');

	function thematic_logo_image() {
		echo '&lt;div id=&quot;logo-image&quot;&gt;&lt;a href=&quot;'.get_option('home').'&quot;&gt;&lt;img src=&quot;'.get_option('child_theme_image').'&quot; /&gt;&lt;/a&gt;&lt;/div&gt;';
	}
	add_action('thematic_header','thematic_logo_image',4);
}
// ---------- Adding the logo image to the header ENDS HERE
?&gt;
</pre>
<p>This source code works on all Thematic 0.9 Child Themes. If you&#8217;re using an older version of Thematic, chances are this won&#8217;t work.</p>
<p>Save and go into your WordPress admin panel under &#8220;Appearance -> Child Theme Options&#8221;. If every thing worked out ok you should have a similar admin panel as the one in the picture on top of the page.</p>
<p>As a side note there&#8217;s already in the works a <a href="http://www.wupperpiraten.de/2009/05/thematic-configuration-plugin/" rel="nofollow">plugin for WordPress that will make modifying Thematic a breeze</a> so keep an eye out for great new things coming your way!</p>


<p>Related posts:<ol><li><a href='http://www.cozmoslabs.com/2009/04/15/add-a-search-box-to-the-thematic-menu/' rel='bookmark' title='Permanent Link: Add a search box to the thematic menu'>Add a search box to the thematic menu</a></li>
<li><a href='http://www.cozmoslabs.com/2009/06/26/thematic-featured-posts/' rel='bookmark' title='Permanent Link: Add &#8220;Featured Posts&#8221; to your Thematic child theme'>Add &#8220;Featured Posts&#8221; to your Thematic child theme</a></li>
<li><a href='http://www.cozmoslabs.com/2010/05/02/thematic-tabbed-widgets/' rel='bookmark' title='Permanent Link: Thematic Tabbed Widgets'>Thematic Tabbed Widgets</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.cozmoslabs.com/2009/05/28/add-a-header-image-to-thematic-the-easy-way/feed/</wfw:commentRss>
		<slash:comments>148</slash:comments>
		</item>
		<item>
		<title>Commune Child Theme &#8211; Update</title>
		<link>http://www.cozmoslabs.com/2009/05/04/commune-child-theme-update/</link>
		<comments>http://www.cozmoslabs.com/2009/05/04/commune-child-theme-update/#comments</comments>
		<pubDate>Mon, 04 May 2009 13:30:43 +0000</pubDate>
		<dc:creator>Cristian</dc:creator>
				<category><![CDATA[Thematic]]></category>
		<category><![CDATA[Theme Design]]></category>

		<guid isPermaLink="false">http://www.cozmoslabs.com/?p=403</guid>
		<description><![CDATA[I&#8217;ve updated Commune Child Theme to version 0.2. This is just a bug fix release, most of them css related. Thanks to everyone that submitted bugs through the comment form on the original Commune page. Related posts:Green anyone? Try Commune &#8211; Thematic Child Theme! Byty the Free Child Theme &#8211; Built on Thematic Cozmoslabs forums


Related posts:<ol><li><a href='http://www.cozmoslabs.com/2009/04/07/green-anyone-try-commune-thematic-child-theme/' rel='bookmark' title='Permanent Link: <span style="color:#7fae52">Green anyone?</span> Try Commune &#8211; Thematic Child Theme!'><span style="color:#7fae52">Green anyone?</span> Try Commune &#8211; Thematic Child Theme!</a></li>
<li><a href='http://www.cozmoslabs.com/2008/10/25/byty-free-child-theme-built-thematic/' rel='bookmark' title='Permanent Link: Byty the Free Child Theme &#8211; Built on Thematic'>Byty the Free Child Theme &#8211; Built on Thematic</a></li>
<li><a href='http://www.cozmoslabs.com/2009/12/14/cozmoslabs-forums/' rel='bookmark' title='Permanent Link: Cozmoslabs forums'>Cozmoslabs forums</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve updated <a href="http://www.cozmoslabs.com/2009/04/07/green-anyone-try-commune-thematic-child-theme/">Commune Child Theme</a> to version 0.2. This is just a bug fix release, most of them css related. </p>
<p>Thanks to everyone that submitted bugs through the comment form on the <a href="http://www.cozmoslabs.com/2009/04/07/green-anyone-try-commune-thematic-child-theme/">original Commune page</a>.</p>


<p>Related posts:<ol><li><a href='http://www.cozmoslabs.com/2009/04/07/green-anyone-try-commune-thematic-child-theme/' rel='bookmark' title='Permanent Link: <span style="color:#7fae52">Green anyone?</span> Try Commune &#8211; Thematic Child Theme!'><span style="color:#7fae52">Green anyone?</span> Try Commune &#8211; Thematic Child Theme!</a></li>
<li><a href='http://www.cozmoslabs.com/2008/10/25/byty-free-child-theme-built-thematic/' rel='bookmark' title='Permanent Link: Byty the Free Child Theme &#8211; Built on Thematic'>Byty the Free Child Theme &#8211; Built on Thematic</a></li>
<li><a href='http://www.cozmoslabs.com/2009/12/14/cozmoslabs-forums/' rel='bookmark' title='Permanent Link: Cozmoslabs forums'>Cozmoslabs forums</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.cozmoslabs.com/2009/05/04/commune-child-theme-update/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Database Caching 148/391 queries in 0.383 seconds using disk

Served from: www.cozmoslabs.com @ 2010-07-31 02:36:55 -->