<?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"
	>

<channel>
	<title>ElasticDog.com &#187; WordPress</title>
	<atom:link href="http://elasticdog.com/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://elasticdog.com</link>
	<description>Imagine Something Clever</description>
	<pubDate>Sat, 26 Apr 2008 02:53:25 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Comments Missing in WordPress Dashboard After 2.5.1 Upgrade</title>
		<link>http://elasticdog.com/2008/04/comments-missing-in-wordpress-dashboard-after-251-upgrade/</link>
		<comments>http://elasticdog.com/2008/04/comments-missing-in-wordpress-dashboard-after-251-upgrade/#comments</comments>
		<pubDate>Sat, 26 Apr 2008 02:22:13 +0000</pubDate>
		<dc:creator>Aaron Schaefer</dc:creator>
		
		<category><![CDATA[WordPress]]></category>

		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://elasticdog.com/?p=28</guid>
		<description><![CDATA[I just upgraded the WordPress installation for ElasticDog to version 2.5.1 and noticed that the Manage Comments page in the administrative Dashboard was not displaying any comments.  I only noticed there was a problem when the interface kept telling me there were 9 comments awaiting moderation, yet it would not let me see them. [...]]]></description>
			<content:encoded><![CDATA[<p>I just upgraded the WordPress installation for ElasticDog to version 2.5.1 and noticed that the Manage Comments page in the administrative Dashboard was not displaying any comments.  I only noticed there was a problem when the interface kept telling me there were 9 comments awaiting moderation, yet <a href="http://elasticdog.com/images/2008/04/awaiting-moderation.png">it would not let me see them</a>.  Everything was displaying correctly on the publicly viewable blog pages, but no comments showed up when trying to access them via the Dashboard.</p>
<p>After searching for a bit and checking my sever logs, I found that the upgrade script did not add the proper index to the &#8220;comment_date_gmt&#8221; column in the comments table for my WordPress database:</p>
<pre><code>Apr 25 18:22:17 php-cgi: WordPress database error Key 'comment_date_gmt' doesn't exist in table 'wp_comment' for query...</code></pre>
<p></p>
<h3 id="solution">The Solution</h3>
<p>If you don&#8217;t want to wait until the upgrade script gets fixed in a later WordPress release, you&#8217;ll have to add the missing index to the database table yourself to get things working again.  I&#8217;ll demonstrate how to do that using the MySQL command line interface, however, if you&#8217;re more comfortable with using phpMyAdmin, see <a href="http://wordpress.org/support/topic/167450#post-737217">the steps outlined here</a>.</p>
<h4 id="privileges">Check for Proper Privileges</h4>
<p>First of all, you must have the proper privileges on your WordPress database in order to add an index.  To check that, follow these steps:</p>
<ol>
<li>Log in to MySQL with whatever account credentials you know.
<pre><code>$ <strong>mysql -u root -p</strong>
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 59202
Server version: 5.0.51a Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql&gt;</code></pre>
</li>
<li>Specify that you want to access the &#8220;mysql&#8221; database, then ensure that you do have the privileges to add indexes.
<pre><code>mysql&gt; <strong>use mysql</strong>
Database changed
mysql&gt; <strong>SELECT user, index_priv FROM user;</strong>
+------------+------------+
| user       | index_priv |
+------------+------------+
| root       | Y          |
| elasticdog | N          |
+------------+------------+
2 rows in set (0.00 sec)</code></pre>
</li>
</ol>
<p>As long as you see a &#8216;Y&#8217; next to your username, then you should be good to go.</p>
<h4 id="cli">Add the Index to the Comments Table</h4>
<p>Once you have access to an account that can add indexes, then follow these steps to add the missing index:</p>
<ol>
<li>Specify that you want to access your WordPress database.  If you don&#8217;t know the name of your WordPress database, run <code>show databases;</code> to see a list of databases you have access to.
<pre><code>mysql&gt; <strong>use elasticdog_wordpress</strong>
Database changed</code></pre>
</li>
<li>Add the index.  The table names for WordPress are fairly standard, but if you don&#8217;t have one named &#8220;wp_comments&#8221;, run <code>show tables;</code> to see a list of contenders and it should be easy to figure out.
<pre><code>mysql&gt; <strong>CREATE INDEX comment_date_gmt ON wp_comments (comment_date_gmt);</strong>
Query OK, 458 rows affected (0.14 sec)
Records: 458  Duplicates: 0  Warnings: 0</code></pre>
</li>
<li>If want to verify that the index was created, run <br /><code>SHOW INDEX FROM wp_comments;</code> to list all indexes, and then you can exit out.</li>
</ol>
<p>If everything went as planned, all will be right in the world and your comments should be viewable through the dashboard once again!</p>
---<br />Related Posts at ElasticDog:<ul><li><a href="http://elasticdog.com/2008/02/howto-install-wordpress-on-nginx/" rel="bookmark" title="February 27th, 2008">HOWTO: Install WordPress on Nginx</a></li>
<li><a href="http://elasticdog.com/2004/10/faking-multiple-templates/" rel="bookmark" title="October 7th, 2004">Faking Multiple Templates in WordPress</a></li>
<li><a href="http://elasticdog.com/2004/11/wp-design-sandbox/" rel="bookmark" title="November 10th, 2004">WordPress Design Sandbox</a></li>
<li><a href="http://elasticdog.com/2008/02/current-status-of-the-code-viewer-wordpress-plugin/" rel="bookmark" title="February 23rd, 2008">Current Status of the Code Viewer WordPress Plugin</a></li>
</ul><!-- Similar Posts took 7.126 ms -->]]></content:encoded>
			<wfw:commentRss>http://elasticdog.com/2008/04/comments-missing-in-wordpress-dashboard-after-251-upgrade/feed/</wfw:commentRss>
		</item>
		<item>
		<title>HOWTO: Install WordPress on Nginx</title>
		<link>http://elasticdog.com/2008/02/howto-install-wordpress-on-nginx/</link>
		<comments>http://elasticdog.com/2008/02/howto-install-wordpress-on-nginx/#comments</comments>
		<pubDate>Wed, 27 Feb 2008 07:15:31 +0000</pubDate>
		<dc:creator>Aaron Schaefer</dc:creator>
		
		<category><![CDATA[WordPress]]></category>

		<category><![CDATA[Nginx]]></category>

		<category><![CDATA[UNIX]]></category>

		<guid isPermaLink="false">http://elasticdog.com/2008/02/howto-install-wordpress-on-nginx/</guid>
		<description><![CDATA[So you want to install the files for <a href="http://wordpress.org/">WordPress</a> in a subdirectory while running your blog in the root directory?  If your server is running <a href="http://httpd.apache.org/">Apache</a>, then <a href="http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory">it's pretty straight forward</a> to do.  Trouble is, what if you want to run a web server that's a little faster and lighter on resources, like <a href="http://nginx.net/">Nginx</a>?  Here's how to do it...]]></description>
			<content:encoded><![CDATA[<p>I recently moved all of my sites from a cheap shared host to a shiny new <abbr title="Virtual Private Server">VPS</abbr> at <a href="http://www.slicehost.com/">SliceHost</a>, and couldn&#8217;t be happier.  Running your own VPS means a great amount of flexibility since you have full root access to the server and get to configure everything exactly how you want it.  That said, it also means that if you want to maintain high performance, you have to keep your resource usage to a minimum.</p>
<p><a href="http://httpd.apache.org/">Apache</a> is a very well-establish web server that can handle just about any situation.  Unfortunately, that flexibility comes at the cost of size and relatively high demands on server resources.  <a href="http://nginx.net/">Nginx</a> (&#8220;engine x&#8221;) is a lightweight web server/reverse proxy that is very efficient and perfect for hosting WordPress.  Read on to see how that can be done&#8230;</p>
<h3 id="step-one">Step One: FastCGI</h3>
<p>First off, Nginx does not provide FastCGI for you (FastCGI is what your web server uses to interact with WordPress&#8217;s <abbr title="PHP: Hypertext Preprocessor">PHP</abbr> code), so you&#8217;ve got to have a way to spawn your own FastCGI processes.  My preferred method is to use the <code>spawn-fcgi</code> program provided by the web server <a href="http://www.lighttpd.net/">lighttpd</a>. You <em>can</em> use PHP&#8217;s built-in FastCGI manager <code>php-cgi</code> to <a href="http://blog.kovyrin.net/2006/05/30/nginx-php-fastcgi-howto/">do the same thing</a>, but it&#8217;s not as straight-forward. Plus, if you learn how to use <code>spawn-fcgi</code>, you can easily adapt it for use with other web applications requiring FastCGI.</p>
<h4>Install spawn-fcgi</h4>
<p>To download and install <code>spawn-fcgi</code>, run the following commands.  Don&#8217;t worry, all of the building happens in your current directory&#8230;nothing else will be installed on your machine.</p>
<pre><code>$ wget http://www.lighttpd.net/download/lighttpd-1.4.18.tar.bz2
$ tar -xvjf lighttpd-1.4.18.tar.bz2
$ cd lighttpd-1.4.18/
$ ./configure
$ make
$ sudo cp src/spawn-fcgi /usr/bin/spawn-fcgi</code></pre>
<p></p>
<p><i>NOTE: If you&#8217;re following the steps above verbatim, you will need to have root privileges in order to copy the binary to its final location&#8230;everything else should work fine as a normal user. To gain root privileges, the program <code>sudo</code> was used in the example above; you may or may not have access to <code>sudo</code> on your machine.</i></p>
<p>After <code>spawn-fcgi</code> has been copied to the desired location, you can safely remove the build directory and original source file:</p>
<pre><code>$ cd ..
$ rm -rf lighttpd-1.4.18/
$ rm lighttpd-1.4.18.tar.bz2</code></pre>
<p></p>
<h4>Run spawn-fcgi</h4>
<p>This part will be fairly distribution-specific, but I&#8217;ll provide the basic command that you&#8217;ll need. What you want to do is find a way to run this command as part of your init scripts so the processes will be spawned automatically when you reboot your server.</p>
<pre><code>/usr/bin/spawn-fcgi -f /usr/bin/php-cgi -a 127.0.0.1 -p 53217 -P /var/run/fastcgi-php.pid</code></pre>
<p></p>
<ul>
<li><code>-f</code> &rarr; the filename of the fcgi-application; in our case we want &#8220;php-cgi&#8221;, which is provided by your distribution&#8217;s <abbr title="PHP: Hypertext Preprocessor">PHP</abbr> package. If you don&#8217;t know where to find it, try running <code>which php-cgi</code> on the command line.</li>
<li><code>-a</code> &rarr; the IP address to bind the processes to; in our case we want the localhost</li>
<li><code>-p</code> &rarr; the port number to bind the processes to; pick whatever you want that won&#8217;t cause a conflict (technically it would be best to pick a random number between 49152 and 65535), just make sure to remember the number and use that same port for your Nginx configuration file later on</li>
<li><code>-P</code> &rarr; the location where to save the process id file; you can use this file to easily kill the processes later</li>
</ul>
<p>For better security, you can also spawn the processes as a non-privileged user by specifying the user/group with the <code>-u</code> and <code>-g</code> flags respectively. For more information on all the available options, run <code>spawn-fcgi -h</code> on the command line. </p>
<p>If you&#8217;re interested in seeing the complete init script that I wrote for use with <a href="http://www.archlinux.org/">Arch Linux</a>, you can download it here: <a href="http://elasticdog.com/code/2008/02/fastcgi-php">fastcgi-php</a></p>
<h3 id="step-two">Step Two: Complete 83.33% of the Famous 5-Minute Install</h3>
<p>Next you should download the WordPress files and extract them to their final location on your server.  Simply follow steps 1&#8211;5 of the <a href="http://codex.wordpress.org/Installing_WordPress#Famous_5-Minute_Install">Famous 5-Minute Install</a> (the 6th and final step requires that your web server be up and running properly, so we&#8217;ll do it later).  This guide will assume that you extracted the WordPress core files here: <code>/srv/www/nginx/domain.com/</code></p>
<h3 id="step-three">Step Three: Nginx Configuration</h3>
<p>To get the web server up and running properly, the file you need to edit is called &#8220;nginx.conf&#8221; and is installed in different places depending on your Linux distribution. If you install Nginx from source, the default location is <code>/usr/local/nginx/conf/nginx.conf</code>, however yours may be somewhere else.</p>
<p>Once you find that file, open it with your favorite text editor and add a server declaration that looks something like this (I&#8217;ll cover what each part means after posting the code):</p>
<pre><code>server {
    listen       <em>12.34.56.78</em>:80;  <strong># your server's public IP address</strong>
    server_name  <em>domain.com</em>;      <strong># your domain name</strong>

    location / {
        root   <em>/srv/www/nginx/domain.com</em>;  <strong># absolute path to your WordPress installation</strong>
        index  index.php index.html index.htm;

        # this serves static files that exist without running other rewrite tests
        if (-f $request_filename) {
            expires 30d;
            break;
        }

        # this sends all non-existing file or directory requests to index.php
        if (!-e $request_filename) {
            rewrite ^(.+)$ /index.php?q=$1 last;
        }
    }

    location ~ \.php$ {
        fastcgi_pass   localhost:<em>53217</em>;  <strong># port where FastCGI processes were spawned</strong>
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME    <em>/srv/www/nginx/domain.com</em>$fastcgi_script_name;  <strong># same path as above</strong>

        fastcgi_param  QUERY_STRING       $query_string;
        fastcgi_param  REQUEST_METHOD     $request_method;
        fastcgi_param  CONTENT_TYPE       $content_type;
        fastcgi_param  CONTENT_LENGTH     $content_length;

        fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
        fastcgi_param  REQUEST_URI        $request_uri;
        fastcgi_param  DOCUMENT_URI       $document_uri;
        fastcgi_param  DOCUMENT_ROOT      $document_root;
        fastcgi_param  SERVER_PROTOCOL    $server_protocol;

        fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
        fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;

        fastcgi_param  REMOTE_ADDR        $remote_addr;
        fastcgi_param  REMOTE_PORT        $remote_port;
        fastcgi_param  SERVER_ADDR        $server_addr;
        fastcgi_param  SERVER_PORT        $server_port;
        fastcgi_param  SERVER_NAME        $server_name;

        # required if PHP was built with --enable-force-cgi-redirect
        fastcgi_param  REDIRECT_STATUS    200;
    }
}</code></pre>
<div class="sourcelink">Download Source Code: <a href="http://elasticdog.com/code/2008/02/nginx-conf.txt">nginx-conf.txt</a></div>
<p></p>
<p>You will need to edit all of the highlighted sections above using your own information.  The first part is merely the server declaration where you define what your server&#8217;s publicly available IP address is and what domain name that address is associated with.</p>
<p>Next we add to that some default settings for the root location.  The key part here is that WordPress uses the &#8220;Front Controller&#8221; design pattern, meaning that any request for a file that does not exist on the server should be handled by the main index.php file.  To do this, we need an appropriate set of rewrite rules pointing to the proper path of our installation.</p>
<p>Last, we add one more location block that tells Nginx to dynamically forward <abbr title="PHP: Hypertext Preprocessor">PHP</abbr> requests to the FastCGI processes we <a href="#step-one">spawned earlier</a>.  That&#8217;s it!</p>
<h3 id="step-four">Step Four: Finishing Up</h3>
<p>Everything should be good to go&#8230;all you need to do now is start your Nginx server process (another distribution specific command), then complete the 6th step of the <a href="http://codex.wordpress.org/Installing_WordPress#Famous_5-Minute_Install">Famous 5-Minute Install</a> and you should have WordPress up and running on Nginx!</p>
<p>If any of this needs further clarification or you&#8217;re just having trouble, leave me a comment and I&#8217;ll see what I can do to help&#8230;</p>
---<br />Related Posts at ElasticDog:<ul><li><a href="http://elasticdog.com/2008/04/comments-missing-in-wordpress-dashboard-after-251-upgrade/" rel="bookmark" title="April 25th, 2008">Comments Missing in WordPress Dashboard After 2.5.1 Upgrade</a></li>
<li><a href="http://elasticdog.com/2004/10/faking-multiple-templates/" rel="bookmark" title="October 7th, 2004">Faking Multiple Templates in WordPress</a></li>
<li><a href="http://elasticdog.com/2008/02/current-status-of-the-code-viewer-wordpress-plugin/" rel="bookmark" title="February 23rd, 2008">Current Status of the Code Viewer WordPress Plugin</a></li>
<li><a href="http://elasticdog.com/2008/02/optimal-title-functionality-now-in-wordpress-core/" rel="bookmark" title="February 20th, 2008">Optimal Title Functionality Now in WordPress Core</a></li>
</ul><!-- Similar Posts took 9.723 ms -->]]></content:encoded>
			<wfw:commentRss>http://elasticdog.com/2008/02/howto-install-wordpress-on-nginx/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Current Status of the Code Viewer WordPress Plugin</title>
		<link>http://elasticdog.com/2008/02/current-status-of-the-code-viewer-wordpress-plugin/</link>
		<comments>http://elasticdog.com/2008/02/current-status-of-the-code-viewer-wordpress-plugin/#comments</comments>
		<pubDate>Sun, 24 Feb 2008 02:56:42 +0000</pubDate>
		<dc:creator>Aaron Schaefer</dc:creator>
		
		<category><![CDATA[WordPress]]></category>

		<category><![CDATA[Plugin]]></category>

		<guid isPermaLink="false">http://elasticdog.com/2008/02/current-status-of-the-code-viewer-wordpress-plugin/</guid>
		<description><![CDATA[This site has been neglected for a long time, and that negligence has carried over to the development of the Code Viewer WordPress plugin as well.  While I&#8217;ve been away, Code Viewer has been picked up/enhanced by a few other developers &#8212; namely AJ and Håkan Carlström &#8212; and has gained many new features&#8230;
Code [...]]]></description>
			<content:encoded><![CDATA[<p>This site has been neglected for a long time, and that negligence has carried over to the development of the <a href="http://elasticdog.com/2004/09/code-viewer/">Code Viewer</a> WordPress plugin as well.  While I&#8217;ve been away, Code Viewer has been picked up/enhanced by a few other developers &#8212; namely <a href="http://flash.terra.ee/">AJ</a> and <a href="http://www.familjencarlstrom.se/WordPress/">Håkan Carlström</a> &#8212; and has gained many new features&#8230;</p>
<p>Code Viewer now supports syntax highlighting using <a href="http://qbnz.com/highlighter/">GeSHi</a>, can display specific line numbers, and has user-configurable scrollbars (among a few other niceties).  On top of those changes, the default code path variable can now be configured directly in WordPress&#8217;s admin interface rather than editing the plugin code by hand&#8230;very nice!</p>
<h3 id="reactions">Reactions</h3>
<p>I don&#8217;t agree with all of the design choices they made with the new changes, but my qualms are minor.  Specifically, I don&#8217;t like some of the chosen defaults, nor the new format when specifying viewcode tags:<br />
<code>[viewcode ] src=/code/example.txt link=yes[/viewcode]</code><br />
&#8230;in comparison to the original:<br />
<code>&lt;viewcode src="/code/example.txt" link="yes" /&gt;</code></p>
<p>That said, it <em>is</em> a cool feeling to find out that other people appreciate your work and chose to carry on with its development in your absence.</p>
<h3 id="torch">Passing the Torch</h3>
<p>With the latest design incarnation here at ElasticDog, I decided to no longer use Code Viewer for displaying code snippets.  Instead, I went with the plugin <a href="http://www.thunderguy.com/semicolon/wordpress/code-markup-wordpress-plugin/">Code Markup</a>, which allows me to easily embed custom markup within code blocks.  It&#8217;s a completely different way of going about displaying code in blog entries when compared to Code Viewer, but it does the job well and suits my needs for the time being.</p>
<p>Although I haven&#8217;t actually worked on the development of Code Viewer since late 2004, I did register to have it hosted at the <a href="http://wordpress.org/extend/plugins/">WordPress Plugin Repository</a>.  Unfortunately, I never got around to packaging it up for general consumption.</p>
<p>Trying to not be a slacker anymore, I <em>have</em> contacted Håkan in hopes of persuading him to take the reins and officially manage the plugin at the centralized WordPress repository.  If he agrees, you should be able to download the plugin here very shortly:<br />
<a href="http://wordpress.org/extend/plugins/code-viewer/">http://wordpress.org/extend/plugins/code-viewer/</a></p>
<p>In the mean time, you can find the <a href="http://www.familjencarlstrom.se/WordPress/2006/08/17/code-viewer/">most up to date version of Code Viewer</a> at <a href="http://www.familjencarlstrom.se/WordPress/">Håkan&#8217;s site</a>.  Happy coding!</p>
---<br />Related Posts at ElasticDog:<ul><li><a href="http://elasticdog.com/2004/09/code-viewer/" rel="bookmark" title="September 26th, 2004">WP Plugin: Code Viewer</a></li>
<li><a href="http://elasticdog.com/2008/02/howto-install-wordpress-on-nginx/" rel="bookmark" title="February 27th, 2008">HOWTO: Install WordPress on Nginx</a></li>
<li><a href="http://elasticdog.com/2008/02/optimal-title-functionality-now-in-wordpress-core/" rel="bookmark" title="February 20th, 2008">Optimal Title Functionality Now in WordPress Core</a></li>
<li><a href="http://elasticdog.com/2008/04/comments-missing-in-wordpress-dashboard-after-251-upgrade/" rel="bookmark" title="April 25th, 2008">Comments Missing in WordPress Dashboard After 2.5.1 Upgrade</a></li>
</ul><!-- Similar Posts took 6.595 ms -->]]></content:encoded>
			<wfw:commentRss>http://elasticdog.com/2008/02/current-status-of-the-code-viewer-wordpress-plugin/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Optimal Title Functionality Now in WordPress Core</title>
		<link>http://elasticdog.com/2008/02/optimal-title-functionality-now-in-wordpress-core/</link>
		<comments>http://elasticdog.com/2008/02/optimal-title-functionality-now-in-wordpress-core/#comments</comments>
		<pubDate>Wed, 20 Feb 2008 07:52:39 +0000</pubDate>
		<dc:creator>Aaron Schaefer</dc:creator>
		
		<category><![CDATA[WordPress]]></category>

		<category><![CDATA[Plugin]]></category>

		<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://elasticdog.com/2008/02/optimal-title-functionality-now-in-wordpress-core/</guid>
		<description><![CDATA[Since three and a half years ago, my Optimal Title plugin has been downloaded by tens of thousands of people and written about by hundreds of bloggers.  Soon, it will become obsolete...]]></description>
			<content:encoded><![CDATA[<p>I wrote <a href="http://elasticdog.com/2004/09/optimal-title/">Optimal Title</a> three and a half years ago to help fix a blatant flaw in <a href="http://wordpress.org">WordPress</a>&#8217;s default usability and search engine optimization (SEO).  Since then, the plugin has been downloaded by tens of thousands of people and written about by hundreds of bloggers.  Soon, the plugin will become obsolete&#8230;</p>
<h3 id="">A Change in WordPress v2.5</h3>
<p>As of the beginning of this year, a <a href="http://trac.wordpress.org/changeset/6538">changeset</a> was checked in to WordPress&#8217;s <abbr title="Subversion">SVN</abbr> repository which adds a &#8220;separator location&#8221; argument to the built-in <code>wp_title()</code> function.  What that means, is that when WordPress v2.5 is released around March 10th of this year, users will be able to change the ordering of their <abbr title="Hypertext Markup Language">HTML</abbr> title tags without having to use a third-party plugin.</p>
<p>The <a href="http://trac.wordpress.org/ticket/4407">developers decided</a> not to change the default behavior of <code>wp_title()</code>, and instead added the additional argument to the function in order to prevent breaking existing themes that rely on the current behavior.</p>
<h3 id="change">How to Make the Change</h3>
<p>If you&#8217;re currently using Optimal Title and want to change your template back to using <code>wp_title()</code> after upgrading to WordPress v2.5 (and you <em>should</em>), here&#8217;s what you need to do&#8230;</p>
<p>Using the simplified example from the <a href="http://elasticdog.com/2004/09/optimal-title/#usage">original Optimal Title article</a>, you should currently have something like this in your theme&#8217;s <kbd>header.php</kbd> file:</p>
<pre><code>&lt;title&gt;&lt;?php optimal_title(); ?&gt; &lt;?php bloginfo('name'); ?&gt;&lt;/title&gt;</code></pre>
<p></p>
<p>Just replace the function call <code>optimal_title()</code> with a call to <code>wp_title('&amp;raquo;',TRUE,'right')</code>, and you&#8217;ll end up with something like this:</p>
<pre><code>&lt;title&gt;&lt;?php wp_title('&amp;raquo;',TRUE,'right'); ?&gt; &lt;?php bloginfo('name'); ?&gt;&lt;/title&gt;</code></pre>
<p></p>
<p>That&#8217;s it!</p>
<h3 id="parameters">Parameters</h3>
<p>The <a href="http://codex.wordpress.org/Template_Tags/wp_title">wp_title codex page</a> won&#8217;t be updated until the next release, however, here is how <code>wp_title()</code> will work after WordPress v2.5 is out:</p>
<pre><code>&lt;?php wp_title('separator', display, 'seplocation'); ?&gt;</code></pre>
<p></p>
<ul>
<li>&#39;separator&#39; - <i>string</i> - The text to place between portions of the page title, such as the blog name and the category. Defaults to <code>'&amp;raquo;'</code> (&raquo;).</li>
<li>display - <i>boolean</i> - Should the title be displayed (<code>TRUE</code>) or returned for use in <abbr title="PHP: Hypertext Preprocessor">PHP</abbr> (<code>FALSE</code>). Defaults to <code>TRUE</code>.</li>
<li>&#39;seplocation&#39; - <i>string</i> - The location of the separator in relation to the title.  All values default to the standard left position, with the exception of <code>'right'</code>, which will place the separator after the title rather than before.</li>
</ul>
<h3 id="glad">I&#8217;m Glad</h3>
<p>Even though it took so long to get this done, I&#8217;m glad WordPress finally came around to the idea and added Optimal Title&#8217;s functionality to the core.  Regardless of whether or not you were using Optimal Title before, I&#8217;d highly recommend that <strong>all</strong> users make this simple change to their templates in order to take advantage of the many benefits that a proper title tag has to offer.</p>
---<br />Related Posts at ElasticDog:<ul><li><a href="http://elasticdog.com/2004/09/optimal-title/" rel="bookmark" title="September 8th, 2004">WP Plugin: Optimal Title</a></li>
<li><a href="http://elasticdog.com/2004/10/faking-multiple-templates/" rel="bookmark" title="October 7th, 2004">Faking Multiple Templates in WordPress</a></li>
<li><a href="http://elasticdog.com/2008/02/current-status-of-the-code-viewer-wordpress-plugin/" rel="bookmark" title="February 23rd, 2008">Current Status of the Code Viewer WordPress Plugin</a></li>
<li><a href="http://elasticdog.com/2004/09/code-viewer/" rel="bookmark" title="September 26th, 2004">WP Plugin: Code Viewer</a></li>
</ul><!-- Similar Posts took 6.316 ms -->]]></content:encoded>
			<wfw:commentRss>http://elasticdog.com/2008/02/optimal-title-functionality-now-in-wordpress-core/feed/</wfw:commentRss>
		</item>
		<item>
		<title>WordPress Design Sandbox</title>
		<link>http://elasticdog.com/2004/11/wp-design-sandbox/</link>
		<comments>http://elasticdog.com/2004/11/wp-design-sandbox/#comments</comments>
		<pubDate>Thu, 11 Nov 2004 02:57:05 +0000</pubDate>
		<dc:creator>Aaron Schaefer</dc:creator>
		
		<category><![CDATA[WordPress]]></category>

		<category><![CDATA[Templating]]></category>

		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">/?p=13</guid>
		<description><![CDATA[It's a good idea to test developmental changes in a protected environment where you know they won't effect anything that's mission critical.  Typically this is simple to do as you can just edit the files on your local machine before uploading them.  Making a test bed for <a href="http://www.wordpress.org">WordPress</a>, however, is a bit more difficult due to the nature of dynamic page generation.]]></description>
			<content:encoded><![CDATA[<p>When creating a website, it&#8217;s best not to make experimental changes to your code directly on your server for the whole world to see.  What if you accidentally mess things up beyond all recognition and don&#8217;t remember exactly what you did?  It&#8217;s a good idea to test developmental changes in a protected environment where you know they won&#8217;t effect anything that&#8217;s mission critical.  Typically this is simple to do as you can just edit the files on your local machine before uploading them.  Making a test bed for <a href="http://www.wordpress.org">WordPress</a>, however, is a bit more difficult due to the nature of dynamic page generation.</p>
<p>WordPress uses <abbr title="PHP: Hypertext Preprocessor">PHP</abbr> to pull data from a database, and then subsequently creates the needed <abbr title="Hypertext Markup Language">HTML</abbr> based off of that data.  Without the <abbr title="PHP: Hypertext Preprocessor">PHP</abbr>, your page would merely render as junk.  Thus, in order to see a design change made in your <abbr title="Cascading Style Sheets">CSS</abbr>, you&#8217;re usually forced to upload the file to your server so WordPress has access to its heart and soul.  Not anymore&#8230;</p>
<h3 id="sandbox">The Sandbox</h3>
<p>In an effort to make things easier on WordPress users wanting to customize the default installation, I&#8217;ve created a static version of the default <abbr title="WordPress">WP</abbr> template and have placed it in a zip file along with a clean copy of <kbd>wp-layout.css</kbd> and <kbd>print.css</kbd>.  The template includes a sample entry that utilizes many common <abbr title="Hypertext Markup Language">HTML</abbr> elements so you can tell exactly what they would look like on your page.</p>
<p>In this developmental sandbox, you can make structural code changes, try out new CSS techniques, whatever you want&#8230;all without having to worry about messing up your live site.  Once you get things the way you like them, simply update your real files accordingly, and you&#8217;re good to go!</p>
<h3 id="intstallation">Installation</h3>
<ol>
<li>Download <a href="http://elasticdog.com/code/2004/11/wp-design-sandbox.zip">wp-design-sandbox.zip</a></li>
<li>Create a new directory on your local machine in which you&#8217;d like to place the test files</li>
<li>Unzip the three files into the newly created directory</li>
<li>Design away</li>
</ol>
---<br />Related Posts at ElasticDog:<ul><li><a href="http://elasticdog.com/2004/10/faking-multiple-templates/" rel="bookmark" title="October 7th, 2004">Faking Multiple Templates in WordPress</a></li>
<li><a href="http://elasticdog.com/2004/11/dxf-cleanup/" rel="bookmark" title="November 5th, 2004">Design by Fire Cleanup</a></li>
<li><a href="http://elasticdog.com/2008/02/howto-install-wordpress-on-nginx/" rel="bookmark" title="February 27th, 2008">HOWTO: Install WordPress on Nginx</a></li>
<li><a href="http://elasticdog.com/2008/02/optimal-title-functionality-now-in-wordpress-core/" rel="bookmark" title="February 20th, 2008">Optimal Title Functionality Now in WordPress Core</a></li>
</ul><!-- Similar Posts took 7.078 ms -->]]></content:encoded>
			<wfw:commentRss>http://elasticdog.com/2004/11/wp-design-sandbox/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
