<?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>EM &#187; WordPress</title>
	<atom:link href="http://www.ericm.ca/tag/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ericm.ca</link>
	<description>Here lies random</description>
	<lastBuildDate>Tue, 07 Sep 2010 13:45:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>vBulletin 4 to bbPress (and WordPress integration)</title>
		<link>http://www.ericm.ca/2010/05/31/vbulletin-4-to-bbpress-and-wordpress-integration/</link>
		<comments>http://www.ericm.ca/2010/05/31/vbulletin-4-to-bbpress-and-wordpress-integration/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 02:39:36 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[bbpress]]></category>
		<category><![CDATA[forum conversion]]></category>
		<category><![CDATA[phpBB 3]]></category>
		<category><![CDATA[user integration]]></category>
		<category><![CDATA[vBulletin 4]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.ericm.ca/?p=274</guid>
		<description><![CDATA[I will be going through the steps on how I achieved the following: Convert vBulletin 4 to bbPress (specifically, I converted from vBulletin 4.0.1 to bbPress 1.0.2) Integrate WordPress with bbPress to share the same users table Make the WordPress database contain the central user database (optional) Preamble I decided to test out bbPress using [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.ericm.ca%2F2010%2F05%2F31%2Fvbulletin-4-to-bbpress-and-wordpress-integration%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.ericm.ca%2F2010%2F05%2F31%2Fvbulletin-4-to-bbpress-and-wordpress-integration%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://www.ericm.ca/wp-content/uploads/2010/05/bbpress.png"><img class="alignnone size-full wp-image-289" title="bbPress" src="http://www.ericm.ca/wp-content/uploads/2010/05/bbpress.png" alt="" width="230" height="82" /></a></p>
<p>I will be going through the steps on how I achieved the following:</p>
<ol>
<li><strong>Convert vBulletin 4 to bbPress</strong> (specifically, I converted from vBulletin 4.0.1 to bbPress 1.0.2)</li>
<li><strong>Integrate WordPress with bbPress to share the same users table</strong></li>
<li><strong>Make the WordPress database contain the central user database</strong> (optional)</li>
</ol>
<h1>Preamble</h1>
<p>I decided to test out bbPress using my <strong>existing </strong>vBulletin 4 installation. This is rather tricky due to the lack of converters out there; as of this post, there are no direct converters from vBulletin 4 to bbPress. I also wanted to integrate (share the user database) between bbPress and WordPress. This allows a user  to sign up only once to access both your WordPress and bbPress installations.</p>
<p>In my case, I wanted WordPress to contain the central user database table. This meant that my bbPress forum would  connect to the WordPress user table. Why? Merely a personal preference. This takes a little more work (then simply using bbPress&#8217; user table) and has its limitations.</p>
<p>I will explain all of this in detail below.</p>
<h1>Initial thoughts on bbPress</h1>
<p>To be blunt bbPress&#8217; basic, out-of-the-box features are primitive compared to all the major forums I&#8217;ve used &#8211; myBB, phpBB, vBulletin, and Invision. bbPress is a forum stripped down to its core &#8211; it doesn&#8217;t even come with basic viewing permissions (yet). It is a massive downgrade from vBulletin 4. If you&#8217;re like me, you <em>will </em>get a lot of headaches downgrading to bbPress.</p>
<p>However, we must keep in mind that bbPress is still in its infancy. When I mentioned that bbPress was primitive, I don&#8217;t really mean that in a negative way. The developers are taking the correct approach in creating a solid core before moving on to the bells and whistles. Look at where WordPress is today. Its userbase is incredibly large and supportive, and I don&#8217;t doubt that hundreds of quality plugins will be available for bbPress as well.</p>
<h1>The limitations of converting</h1>
<p>Converting from vBulletin 4 to bbPress isn&#8217;t without its speed bumps. Since there&#8217;s no official converter, it will not go as smoothly as one would hope.</p>
<p>The only solution (as of this blog entry), is to convert vBulletin 4 to phpBB3. Then from phpBB3 to bbPress. What happens along the way?</p>
<ul>
<li>All your members will default to either the member or administrator role. This means groups like moderators will become ordinary members and you&#8217;ll need to reassign their role</li>
<li>Passwords won&#8217;t work. All members will need to reset their password (by having them click the reset password link in bbPress to have a randomly-generated password sent to their e-mail accounts)</li>
<li>Certain features like attachments may not transfer over (bbPress is no where near as feature-rich as vBulletin 4 and therefore won&#8217;t be able to retain <em>everything</em>)</li>
</ul>
<p>If you&#8217;re fine with the above and mainly want to transfer your posts and members, then keep on reading!</p>
<h1>Converting vBulletin 4 to bbPress</h1>
<p>As mentioned above, you will first need to convert vBulletin 4 to phpBB3.</p>
<h3>Step 1: Install phpBB 3</h3>
<p>Install a fresh copy of phpBB 3 in the <em>same domain </em>as your vBulletin 4 forum. For example, if your vBulletin is located at www.yoursite.com/forums, then phpBB must be also located at www.yoursite.com.</p>
<p>However, you may install phpBB3 to a different mySQL database. <strong>I recommend that you select a database where you want bbPress to be installed</strong> (you will see why in step 3).</p>
<p>The official phpBB download page can be found <a href="http://www.phpbb.com/downloads/olympus.php?from=submenu">here</a>.</p>
<h3>Step 2: Download the vBulletin 3 to phpBB 3 converter</h3>
<p>That is correct, the vBulletin <strong>3</strong> (not 4!) converter as that&#8217;s the latest version out there. You can download it <a href="http://www.phpbb.com/community/viewtopic.php?f=65&amp;t=1722325">here</a>.</p>
<p>After you have downloaded the .zip file, simply upload the 2 folders to your phpBB directory.</p>
<p><strong>Do not run the convert yet as you will run into errors. </strong>The fix can be found in the modified <strong class="location">convert_vb30.php</strong> file which can be find <a href="http://www.phpbb.com/community/download/file.php?id=116915">here</a> (thanks for the fix <em>excelcoder</em>!) Be sure you rename that file before uploading it!</p>
<p>Proceed to run the converter. Instructions can be found at the official phpBB forum <a href="http://www.phpbb.com/community/viewtopic.php?f=65&amp;t=1213555">here</a>. Basically, you will need to provide certain information such as where your current vBulletin folder is located and the database information.</p>
<p>Your conversion should go smoothly. <strong>The converter will probably tell you that the search index hasn&#8217;t been built yet. </strong>Don&#8217;t worry about this; when you convert to bbPress later, search will work. <strong>You may notice that viewing permissions aren&#8217;t functioning properly, for example, hidden forums are visible to all regular members.</strong> Don&#8217;t bother to tinker around in phpBB&#8217;s admin control panel to fix the permissions. When you convert from phpBB 3 to bbPress, you&#8217;ll just run into the same problem.</p>
<p>As long as all your posts are present and displaying properly, and all the members are transferred, proceed to the next step.</p>
<h3>Step 3: Download the phpBB3 to bbPress converter</h3>
<p>Instructions on running this converter and the download link can be found in the bbPress support forum <a href="http://bbpress.org/forums/topic/phpbb3-gt-bbpress-converter-beta-release">here</a> (thanks wmnasef!) I&#8217;ll summarize the steps here:</p>
<ol>
<li><a href="http://bbpress.org/download/">Download</a> and install bbPress. bbPress can be installed <em>anywhere</em> including a different domain. <strong>Use the database I mentioned in step 1! </strong>(Reason: the converter requires the phpBB forum to be installed in the same database as bbPress in order to run.)</li>
<li><a href="http://members.lycos.co.uk/wmnkhayal/files/phpbb3tobbpress%20converter.tar.gz">Download</a> the converter</li>
<li>Upload <strong class="location">phpbb3tobbpress.php</strong> into your phpBB3 directory</li>
<li>Upload <strong class="location">_phpbb3_pass.php</strong> into the bb-plugins directory</li>
<li>Run the <strong class="location">phpbb3tobbpress.php</strong>, for example, <strong class="location">http://www.yourforum.com/phpbb3/phpbb3tobbpress.php</strong></li>
</ol>
<p>Everything should convert smoothly. At this point, you&#8217;re probably looking at the admin panel and banging your head against your desk thinking &#8211; where are the bloody features?! Well, since you&#8217;re already there, be sure to set the appropriate members to the moderator role, etc.</p>
<h1>WordPress Integration</h1>
<p>WordPress integration allows both your bbPress forum and WordPress blog to share the same user database table. If you&#8217;re using the default prefixes, then the bbPress user table is named <strong class="location">bb_users,</strong> and <strong class="location">wp_users</strong> for WordPress.</p>
<p>If you followed my<strong> Converting vBulletin 4 to bbPress guide</strong> above, then all your users are currently residing in <strong>bb_users</strong>.</p>
<p>In the following, I will go through the steps for integrating bbPress with WordPress, regardless of whether you choose bb_users or wp_users as your main user table.</p>
<h3>Step 1: Login to your bbPress</h3>
<p>Once logged in, click on the Admin link. Click on the <strong>WordPress Integration tool</strong> (<strong>Settings &gt; WordPress Integration</strong>).</p>
<h3>Step 2: Set User Role Map</h3>
<p>For WordPress administrators, the bbPress role would be <strong>bbPress Key Master</strong>. Everybody else should be set to<strong> bbPress Member</strong>. Click <em>Save Changes</em> and return to the same page.</p>
<h3>Step 3: User Integration &gt; Cookies (part 1 &#8211; the form)</h3>
<p>Farther down the page, you should see an area named <strong>Cookies</strong>. Cookies allow users to login at your WordPress blog without having to login a second time at your bbPress forums, and vice versa.</p>
<p>I&#8217;ll divide cookie setup into 3 separate steps to make things easier.</p>
<p>The first part with the form contains instructions that are relatively straightforward and involve minor copy-and-pasting.</p>
<h3>Step 4: User Integration &gt; Cookies (part 2 &#8211; the plugin)</h3>
<p>Near the bottom, it will ask you to install a bbPress plugin for WordPress. The easiest way to do so is in the admin area of your WordPress and clicking <strong class="location">Plugins &gt; Add New</strong>. Simply search for <strong>bbPress Integration</strong> and install it. What this plugin does is give you a simple piece of code to add to the config file for WordPress (<strong class="location">wp-config.php</strong>). Save the file, but don&#8217;t close it yet!</p>
<h3>Step 5: User Integration &gt; Cookies (part 3 &#8211; the config files)</h3>
<p>This is the final step for setting up cookies. It involves additional edits that you need to apply to <strong>wp-config.php</strong> and bbPress&#8217; config file (<strong>bb-config.php</strong>).</p>
<p>First, access these <a href="https://api.wordpress.org/secret-key/1.1/">randomly-generated constants</a>. Find the related code in <strong>wp-config.php</strong> and paste the constants into it. Do the same for <strong>bb-config.php</strong>.</p>
<h3>Step 6: User Integration &gt; User Database</h3>
<p>Step 2 is critical before you can perform this next step so make sure user roles have been mapped.</p>
<p>Note: the following assumes that you are using the default prefixes: <strong>bb_</strong> for bbPress and <strong>wp_</strong> for WordPress. If not, substitute the following instructions with your own prefixes.</p>
<p><strong>The table prefix you select may depend on 4 different scenarios:</strong></p>
<ol>
<li>Both your WordPress and bbPress have no registered members except for yourself. <strong>Either bb_ or wp_ will work depending on your personal preferences.<br />
</strong></li>
<li>WordPress contains all your users. <strong>Use wp_.</strong></li>
<li>bbPress contains all your users. <strong>Use bb_</strong>.</li>
<li>bbPress contains all your users<em> but you want to use the user table in WordPress</em>. <strong>Use wp_ and do step 7.<br />
</strong></li>
</ol>
<p>If you chose scenario 4, hit <em>Save Changes</em>, and move on to step 7.</p>
<p>Otherwise, you&#8217;re basically done! Just fill out the advanced database settings if your WordPress is installed on a different database than bbPress. Hit <em>Save Changes</em> and skip the rest of this guide.</p>
<h3>Step 7: Renaming users and usermeta tables</h3>
<p>This step is required for scenario 4 (as outlined in step 6) because if you set the table prefix to wp_ and do nothing else, the threads and posts in bbPress will no longer be linked to the original user from the bbPress user table. That&#8217;s because at this point, bbPress is accessing all posts/threads in the bbPress database while attempting to access the users from the WordPress database.</p>
<p>For this step, you&#8217;ll need access to <strong>phpMyAdmin</strong>.</p>
<p><strong>If bbPress and WordPress are installed on the same database</strong>, you can execute a simple SQL query such as:</p>
<blockquote><p><strong class="code">RENAME TABLE wp_usermeta TO wp_usermeta_ignore;</strong></p>
<p><strong class="code">RENAME TABLE wp_users TO wp_users_ignore;</strong></p>
<p><strong class="code">RENAME TABLE bb_usermeta TO wp_usermeta;</strong></p>
<p><strong class="code">RENAME TABLE bb_users TO wp_users;</strong></p></blockquote>
<p>This basically swaps the user tables (and their related usermeta data) by renaming the tables. The bbPress user and usermeta tables basically replace the WordPress counterparts (the code simply renames the original tables instead of deleting them).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ericm.ca/2010/05/31/vbulletin-4-to-bbpress-and-wordpress-integration/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress 2.9.1 HTTP error</title>
		<link>http://www.ericm.ca/2010/01/21/wordpress-2-9-1-http-error/</link>
		<comments>http://www.ericm.ca/2010/01/21/wordpress-2-9-1-http-error/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 10:56:25 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.ericm.ca/?p=216</guid>
		<description><![CDATA[After upgrading to WordPress 2.9.1, I encountered a problem when using the media file uploader. Any attempts to upload an image would return an HTTP error: There are many solutions out there, but unfortunately none of the ones listed worked for me. I did find a very simple fix however. HTTP error fix The answer [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.ericm.ca%2F2010%2F01%2F21%2Fwordpress-2-9-1-http-error%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.ericm.ca%2F2010%2F01%2F21%2Fwordpress-2-9-1-http-error%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>After upgrading to WordPress 2.9.1, I encountered a problem when using the <strong>media file uploader</strong>. Any attempts to upload an image would return an <strong>HTTP error</strong>:</p>
<div id="attachment_220" class="wp-caption aligncenter" style="width: 682px"><img class="size-full wp-image-220" src="http://www.ericm.ca/files/2010/01/http_error1.png" alt="WordPress Media File uploader" width="672" height="306" /><p class="wp-caption-text">WordPress Media File uploader</p></div>
<p>There are <a href="http://wordpress.org/support/topic/293853?replies=17">many solutions</a> out there, but unfortunately none of the ones listed worked for me. I did find a very simple fix however.</p>
<h2>HTTP error fix</h2>
<p>The answer was right in front of me! Specifically, in the uploader popup window:</p>
<blockquote><p>You are using the Flash uploader. Problems? Try the <strong>Browser uploader</strong> instead.</p></blockquote>
<p>The Browser Uploader worked perfectly fine for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ericm.ca/2010/01/21/wordpress-2-9-1-http-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blog updates and et cetera</title>
		<link>http://www.ericm.ca/2009/08/19/27/</link>
		<comments>http://www.ericm.ca/2009/08/19/27/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 10:05:30 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Site]]></category>
		<category><![CDATA[Adobe Photoshop]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[hockey]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://ericm.ca/?p=27</guid>
		<description><![CDATA[Time to make this blog more personal so I&#8217;ll talk and empty my mind here a bit for is this not where random lies?! I finally updated WordPress from 2.3 (yeah, it&#8217;s been a while) to 2.8.4. Never thought WordPress could get any better than before; the dashboard is much more pleasing to the eye [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.ericm.ca%2F2009%2F08%2F19%2F27%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.ericm.ca%2F2009%2F08%2F19%2F27%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Time to make this blog more personal so I&#8217;ll talk and empty my mind here a bit for is this not where random lies?!<span id="more-27"></span></p>
<p>I finally updated WordPress from 2.3 (yeah, it&#8217;s been a while) to 2.8.4. Never thought WordPress could get any better than before; the dashboard is much more pleasing to the eye and it looks like there is a bunch of useful new features like the Media library. Can&#8217;t wait to play around with the GUI and get used to everything. Unfortunately, the custom WordPress theme I was using wouldn&#8217;t cooperate with the new upgrade so I&#8217;m going to use <a href="http://themeshaper.com/thematic/">Thematic</a> for now and perhaps customize it heavily over the next little while. We&#8217;ll see.</p>
<p>Hmm. It seems as though I haven&#8217;t done anything web-related in a while. Like web design. Kinda itching to crack open Photoshop and work off the rust. Maybe hit two birds with one stone by entering some contests at <a href="http://99designs.com">99designs</a>. A little extra cash wouldn&#8217;t hurt.</p>
<p>I brainstormed some interesting blog material on paper over the months and I&#8217;ll probably start posting some of them up here. Topics mainly on technology and the internet. Maybe I&#8217;ll even start up a little portfolio of my digital works here.</p>
<p>I&#8217;ve also returned to an idea I wrought up nearly 3 years ago which I&#8217;ve been planning (something I love to do) on and off (more off then on). It has to do with &#8216;web 2.0&#8242; and folksonomies and the like. I hope posting about it here will motivate me to actually polish it off and shift it into development mode. Haha, who am I kidding?</p>
<p>There are many things that I have grown interested in over the years and one of them is hockey. Today, I assembled a hockey net which was 45-minutes of fun (I love building things, it goes back to when I played with my first Lego set). I probably took longer than normal as the weather started off uncomfortably sunny and then started to drizzle). Now, I can practice wrist shots and the like in the comfort of my backyard. I will need to buy some plywood or something so that I can handle the puck more smoothly (rubber and concrete don&#8217;t mix). Before, I have been using one of those smart hockey balls, the kind Vincent Lecavalier supposedly uses in the off-season, but I&#8217;d rather get used to a puck since nothing can mimic a puck better than a puck. Of course, I still need to learn the nuisance of skating &#8211; my new Bauer 22s are barely worn in &#8211; which I&#8217;ve done only a few times the past winter in a nearly outdoor rink, but I&#8217;ll worry about that later. On a hockey-related note, I can&#8217;t wait for the NHL season to start! Canadian football just isn&#8217;t enough in this long and boring off-season.</p>
<p>That&#8217;s all for now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ericm.ca/2009/08/19/27/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using 2 or more different sidebars in WordPress</title>
		<link>http://www.ericm.ca/2008/01/03/using-2-different-sidebars-in-wordpress-my-first-php-code/</link>
		<comments>http://www.ericm.ca/2008/01/03/using-2-different-sidebars-in-wordpress-my-first-php-code/#comments</comments>
		<pubDate>Fri, 04 Jan 2008 05:48:53 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[sidebars]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://ericm.ca/2008/web-development/using-2-different-sidebars-in-wordpress-my-first-php-code</guid>
		<description><![CDATA[I purchased a PHP book over 6 years ago and I only got through the first 20-30 pages before putting it down and letting it gather dust. After six long years, I finally faced a problem big enough for me to actually write a piece of code: How to display two or more different WordPress [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.ericm.ca%2F2008%2F01%2F03%2Fusing-2-different-sidebars-in-wordpress-my-first-php-code%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.ericm.ca%2F2008%2F01%2F03%2Fusing-2-different-sidebars-in-wordpress-my-first-php-code%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>I purchased a PHP book over 6 years ago and I only got through the first 20-30 pages before putting it down and letting it gather dust. After six long years, I finally faced a problem big enough for me to actually write a piece of code:<br />
<em><br />
How to display two or more different WordPress sidebars (the column on the right) depending on the page a user is currently viewing?</em><span id="more-14"></span></p>
<h2>The Problem </h2>
<p>WordPress currently displays a single sidebar for all your templates (sidebar.php). My problem was that I wanted to use another sidebar (let&#8217;s call it sidebar2.php) as well. More specifically, I wanted this second sidebar to be displayed <em>only </em>on &#8216;<strong class="location">Single Post</strong>&#8216; (the template that displays the full blog post; the webpage you are viewing now). Then, the first sidebar would be displayed for all the other pages.</p>
<p>Being the newbie programmer I am, I tried using the <strong>original sidebar include code</strong> that WordPress uses to display the sidebar in your templates:</p>
<blockquote><p><strong class="code">&lt;?php get_sidebar(); ?&gt;</strong> </p></blockquote>
<p>And then modified it:</p>
<blockquote><p><strong class="code">&lt;?php get_sidebar<strong>2</strong>(); ?&gt;</strong></p></blockquote>
<p>Unfortunately, this did not work.</p>
<h2>The Solution</h2>
<p>Luckily, I stumbled upon this useful <a href="http://codex.wordpress.org/Conditional_Tags">page</a> at WordPress about &#8216;Conditional Tags,&#8217; specifically <a href="http://codex.wordpress.org/Conditional_Tags#Single_Post">this</a> section. </p>
<p>Basically, it tells us that &#8216;<strong class="location">Single Post</strong>,&#8217; the page you are currently viewing, is defined by WordPress as <strong class="code">&#8216;is_single()&#8217;</strong>. This is the page where I wanted to display the second sidebar. This also means that for every other page that was <em>not </em><strong class="code">&#8216;is_single()&#8217;</strong>, I would simply use the <em>original </em>sidebar include code to display the first sidebar as mentioned earlier.</p>
<p>Thus, a simple PHP <strong class="code">if and else</strong> conditional statement will do the trick. I replaced <strong class="code">&lt;?php get_sidebar(); ?&gt;</strong> from <strong class="location">header.php</strong> (or wherever this code is included in your template) with:</p>
<blockquote><p><strong class="code">&lt;?php<br />
if (is_single())<br />
include (TEMPLATEPATH . &#8216;/sidebar2.php&#8217;);<br />
else<br />
get_sidebar();<br />
?&gt;</strong></p>
<p><strong>Note:</strong> The above code assumes that you have created and uploaded a WordPress template called sidebar2.php</p></blockquote>
<p>In layman&#8217;s terms, <em>if</em> the current page you are viewing is &#8216;<em>Single Post</em>,&#8217; <em>then </em>the <em>second sidebar</em> will be displayed. <em>Else</em>, the <em>first sidebar</em> is displayed for all other pages. This piece of code can be adapted in many different ways including displaying more than 2 sidebars and displaying sidebars for specific templates.</p>
<p>I guess this is a rather simple fix, but after hours of Googling for a solution, I noticed that a lot of other WordPress users experienced this same problem.  Hopefully this article helps!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ericm.ca/2008/01/03/using-2-different-sidebars-in-wordpress-my-first-php-code/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
