<?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>Solutions Log &#187; WordPress</title>
	<atom:link href="http://solutions.treypiepmeier.com/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://solutions.treypiepmeier.com</link>
	<description>So I don&#039;t have to figure things out more than once.</description>
	<lastBuildDate>Sun, 22 Aug 2010 19:26:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Display the Number of Comments on a Blog Post in EE and WP</title>
		<link>http://solutions.treypiepmeier.com/2009/10/29/display-the-number-of-comments-on-a-blog-post-in-ee-and-wp/</link>
		<comments>http://solutions.treypiepmeier.com/2009/10/29/display-the-number-of-comments-on-a-blog-post-in-ee-and-wp/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 22:13:18 +0000</pubDate>
		<dc:creator>Trey</dc:creator>
				<category><![CDATA[ExpressionEngine]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://solutions.treypiepmeier.com/?p=316</guid>
		<description><![CDATA[ExpressionEngine: &#60;a href="{comment_url_title_auto_path}#comments"&#62;{comment_total} {if comment_total == 1}Comment{if:else}Comments{/if}&#60;/a&#62; WordPress: &#60;?php comments_popup_link('0 Comments', '1 Comment', '% Comments'); ?&#62;]]></description>
			<content:encoded><![CDATA[<p>ExpressionEngine:</p>

<pre><code>&lt;a href="{comment_url_title_auto_path}#comments"&gt;{comment_total} {if comment_total == 1}Comment{if:else}Comments{/if}&lt;/a&gt;
</code></pre>

<p>WordPress:</p>

<pre><code>&lt;?php comments_popup_link('0 Comments', '1 Comment', '% Comments'); ?&gt;
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://solutions.treypiepmeier.com/2009/10/29/display-the-number-of-comments-on-a-blog-post-in-ee-and-wp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flagging a Post as Outdated Using WordPress Custom Fields</title>
		<link>http://solutions.treypiepmeier.com/2008/06/14/using-wordpress-custom-fields/</link>
		<comments>http://solutions.treypiepmeier.com/2008/06/14/using-wordpress-custom-fields/#comments</comments>
		<pubDate>Sat, 14 Jun 2008 22:22:17 +0000</pubDate>
		<dc:creator>Trey</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://solutions.treypiepmeier.com/?p=92</guid>
		<description><![CDATA[If you write a blog whose primary purpose is to help people find and remember information (mostly myself in this case), then it&#8217;s probably a good idea to flag certain posts as out-of-date so as not to mislead people who are on a quest for knowledge. That is, of course, if you know it&#8217;s outdated. [...]]]></description>
			<content:encoded><![CDATA[<p>If you write a blog whose primary purpose is to help people find and remember information (mostly myself in this case), then it&#8217;s probably a good idea to flag certain posts as out-of-date so as not to mislead people who are on a quest for knowledge.  That is, of course, if you know it&#8217;s outdated.  Maybe <a href="/2006/12/04/rails-migration-data-types/#comment-16966">someone will tell you</a>.</p>

<p>In any case, here&#8217;s how you can do it using Custom Fields in WordPress.</p>

<p>Find a post that&#8217;s out of date and edit it.  Down towards the bottom of the page, there&#8217;s a section labeled Custom Fields, click it to open it, and enter something like this:</p>

<p><img src="/wp-content/uploads/2008/06/create_custom_field.png" alt="Create a Custom Field" /></p>

<p>Use whatever name you want for the <code>key</code> and <code>value</code>, but be sure to change the related fields in the other places I&#8217;m about to mention.</p>

<p>I want the notice to show up on the post&#8217;s permalink page, so in <code>single.php</code>, I put this right after the start of &#8216;the loop&#8217;:</p>

<pre><code>$status = get_post_meta($post-&gt;ID, 'status', true);
</code></pre>

<p>As you can probably guess, that just grabs the content for the &#8216;status&#8217; key for the current post and stores it in the variable <code>$status</code>.  Easy.  If the post doesn&#8217;t have the value, the <code>get_post_meta</code> tag is nice enough to fail quietly (as far as I can tell).</p>

<p>Now that you have this very valuable information, you can change CSS, add a warning message, or whatever your little heart desires.</p>

<p>For example:</p>

<pre><code>if ($status == 'outdated') include (TEMPLATEPATH . '/outdated.php');
</code></pre>

<h3>Sources</h3>

<ul>
<li>I got the idea from <a href="http://bryanveloso.com/">Bryan Veloso</a>&#8216;s <a href="http://avalonstar.com/blog/2007/may/4/my-reasons-django/">Avalonstar</a></li>
<li><a href="http://codex.wordpress.org/Function_Reference/get_post_meta">WordPress Codex / get_post_meta</a></li>
<li><a href="http://codex.wordpress.org/Using_Custom_Fields">WordPress Codex / Using Custom Fields</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://solutions.treypiepmeier.com/2008/06/14/using-wordpress-custom-fields/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using Something Other Than the Site Root for a WordPress Posts Page</title>
		<link>http://solutions.treypiepmeier.com/2008/06/09/wordpress-posts-page/</link>
		<comments>http://solutions.treypiepmeier.com/2008/06/09/wordpress-posts-page/#comments</comments>
		<pubDate>Mon, 09 Jun 2008 23:10:21 +0000</pubDate>
		<dc:creator>Trey</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://solutions.treypiepmeier.com/?p=90</guid>
		<description><![CDATA[This is so you can use something like /blog/ for a list of your blog entries, and the home page for a static page (or something fancier). Under Settings &#62; Reading &#62; Posts page, pick the page template you want to use. If you&#8217;re using a static page template for the home page, be sure [...]]]></description>
			<content:encoded><![CDATA[<p>This is so you can use something like <code>/blog/</code> for a list of your blog entries, and the home page for a static page (or something fancier).</p>

<p>Under Settings &gt; Reading &gt; Posts page, pick the page template you want to use.</p>

<p><img src="http://solutions.treypiepmeier.com/wp-content/uploads/2008/06/wp_posts_page.png" alt="Setting WordPress Posts page" /></p>

<p>If you&#8217;re using a static page template for the home page, be sure <strong>not</strong> to name it <code>home.php</code>.  Name it something like <code>homepage.php</code> and choose that template for the home page (you can still call it &#8220;Home&#8221; inside the template).</p>

<p>The &#8220;Posts page&#8221; will use <code>index.php</code> whether you like it or not.  I couldn&#8217;t find a way to override that inside of Post management in WordPress.</p>
]]></content:encoded>
			<wfw:commentRss>http://solutions.treypiepmeier.com/2008/06/09/wordpress-posts-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing WordPress The Right Way (revised)</title>
		<link>http://solutions.treypiepmeier.com/2008/05/28/installing-wordpress-the-right-way/</link>
		<comments>http://solutions.treypiepmeier.com/2008/05/28/installing-wordpress-the-right-way/#comments</comments>
		<pubDate>Wed, 28 May 2008 16:25:32 +0000</pubDate>
		<dc:creator>Trey</dc:creator>
				<category><![CDATA[Subversion]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://solutions.treypiepmeier.com/?p=88</guid>
		<description><![CDATA[Keep WordPress core files entirely separate from your content (themes, plugins, uploads). There are a couple of ways to keep your WordPress install up-to-date. The easiest way is to install it as an svn:external. In the root of your (Subversioned) site: svn propedit svn:externals . Then paste in: wordpress http://svn.automattic.com/wordpress/tags/[current_tag_number] Replacing [current_tag_number] with the current [...]]]></description>
			<content:encoded><![CDATA[<p>Keep WordPress core files entirely separate from your content (themes, plugins, uploads).</p>

<p>There are a couple of ways to keep your WordPress install up-to-date.  The easiest way is to install it as an <code>svn:external</code>.  In the root of your (Subversioned) site:</p>

<pre><code>svn propedit svn:externals .
</code></pre>

<p>Then paste in:</p>

<pre><code>wordpress http://svn.automattic.com/wordpress/tags/[current_tag_number]
</code></pre>

<p>Replacing <code>[current_tag_number]</code> with the current tag number (check <a href="http://wordpress.org/download/">wordpress.org/download/</a> to see the latest).  Alternately, you can just <a href="http://wordpress.org/download/">download WordPress</a> and put it in a <code>wordpress</code> folder (or <code>wp</code> or whatever you prefer) in the root of your site.</p>

<p>Now copy the default <code>wp-content</code> folder from the fresh copy of WordPress to the root of your site:</p>

<pre><code>cp -R wordpress/wp-content .
</code></pre>

<p>Delete the existing <code>.svn</code> folders from your fresh new <code>wp-content</code>.</p>

<pre><code>cd wp-content
rm -rf `find . -type d -name .svn`
</code></pre>

<p>Now create your <code>wp-config.php</code></p>

<pre><code>cd ..
cp wordpress/wp-config-sample.php wp-config.php
</code></pre>

<p>Edit the file and add your database info.  While you&#8217;re in there, add these settings to the top of the file:</p>

<pre><code>// Custom wp-content folder: 
define('WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/wp-content' );
define('WP_CONTENT_URL', 'http://' . $_SERVER['SERVER_NAME'] . '/wp-content');

define('WP_HOME', 'http://' . $_SERVER['SERVER_NAME'] . '');
define('WP_SITEURL', 'http://' . $_SERVER['SERVER_NAME'] . '/wordpress');
</code></pre>

<p>Those settings do a number of cool things.  First, you&#8217;re allowing WordPress to use your fresh copy of <code>wp-content</code> in the root of your site instead of the one that lives inside of the <code>wordpress</code> folder.  Second, you&#8217;re specifically setting some WordPress variables that are normally defined in its database in PHP, so that you won&#8217;t have to readjust your settings between development (on your local machine) and where it lives in the wild.  Third, you&#8217;re telling WordPress where to find it&#8217;s core files since you&#8217;ve put them in a subfolder (<code>/wordpress</code>).</p>

<p>Now copy <code>index.php</code> from WordPress to the root of your site:</p>

<pre><code>cp wordpress/index.php .
</code></pre>

<p>Edit the file and change the line that says:</p>

<pre><code>require('./wp-blog-header.php');
</code></pre>

<p>To this:</p>

<pre><code>require('./wordpress/wp-blog-header.php');
</code></pre>

<p>If you want fancy URLs (you do), create an <code>.htaccess</code> file:</p>

<pre><code>touch .htaccess
chmod 666 .htaccess
</code></pre>

<p>Duplicate the <code>default</code> theme:</p>

<pre><code>cp -R wp-content/themes/default wp-content/themes/[your_new_theme]
</code></pre>

<p>Replacing <code>[your_new_theme]</code> with what you want your new theme to be called.</p>

<h3>Bonus: keep Akismet as an svn:external for automatic updates from <a href="http://automattic.com/">Automattic</a>.</h3>

<pre><code>cd wp-content/plugins/
rm -rf akismet
</code></pre>

<p>Or, if you&#8217;re already committed your code:</p>

<pre><code>svn rm akismet
svn ci -m "Moving Akismet to external."
</code></pre>

<p>Then setup the external link:</p>

<pre><code>svn propedit svn:externals .
</code></pre>

<p>Paste in:</p>

<pre><code>akismet http://plugins.svn.wordpress.org/akismet/trunk/
</code></pre>

<h3>That&#8217;s it.</h3>

<p>Now commit your code and get to it.  If you get lost, check out <a href="http://wp-template.googlecode.com/">wp-template</a> for an example.</p>

<h3>Updating WordPress</h3>

<pre><code>svn propedit svn:externals .
</code></pre>

<p>Change the tag number, then <code>svn update</code> and you&#8217;re good to go.</p>

<p>If you&#8217;re not using <code>svn:externals</code>, just dump a new copy of WordPress over the one that&#8217;s already in <code>/wordpress</code>.  There&#8217;s no way you can hurt your existing content, because that&#8217;s all in the <code>/wp-content</code> folder in the root of your site.</p>

<h3>Sources</h3>

<ul>
<li><a href="http://codex.wordpress.org/Installing/Updating_WordPress_with_Subversion">Installing/Updating WordPress with Subversion</a></li>
<li><a href="http://codex.wordpress.org/Changing_File_Permissions">Changing File Permissions</a></li>
<li><a href="http://www.anyexample.com/linux_bsd/bash/recursively_delete__svn_directories.xml">Recursively delete .svn directories</a></li>
<li><a href="http://codex.wordpress.org/Editing_wp-config.php">Editing wp-config.php</a></li>
<li><a href="http://tumblr.jasontan.org/post/72133202/wp-config">WP Config</a></li>
<li><a href="http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory">Giving WordPress its own Directory</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://solutions.treypiepmeier.com/2008/05/28/installing-wordpress-the-right-way/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Using Subversion to upgrade WordPress</title>
		<link>http://solutions.treypiepmeier.com/2006/10/08/using-subversion-to-upgrade-wordpress/</link>
		<comments>http://solutions.treypiepmeier.com/2006/10/08/using-subversion-to-upgrade-wordpress/#comments</comments>
		<pubDate>Sun, 08 Oct 2006 20:05:15 +0000</pubDate>
		<dc:creator>Trey</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://solutions.treypiepmeier.com/2006/10/08/using-subversion-to-upgrade-wordpress/</guid>
		<description><![CDATA[Use svn:externals to install WordPress plugins How to use SVN to update WordPress Subversioning WordPress Upgrades Update (November 1, 2006): It really works. I&#8217;ve got all 3 of my blogs (one two three) now set up on SVN. The next step will to be when I add my customized themes to Subversion so all I [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li><a href="http://fucoder.com/2006/04/svnexternal-wordpress-plugins/">Use svn:externals to install WordPress plugins</a></li>
<li><a href="http://sethkinast.com/blog/archive/2005/05/31/svn-wordpress/">How to use SVN to update WordPress</a></li>
<li><a href="http://photomatt.net/2005/05/19/subversioning-wordpress-upgrades/">Subversioning WordPress Upgrades</a></li>
</ul>

<p><strong>Update (November 1, 2006):</strong> It really works.  I&#8217;ve got all 3 of my blogs (<a href="http://syntheticrabbit.com/blog/">one</a> <a href="http://treypiepmeier.com/">two</a> <a href="http://solutions.treypiepmeier.com/">three</a>) now set up on SVN.  The next step will to be when I add my customized themes to Subversion so all I ever have to do is go to the command line to do anything.  No (s)FTP or anything.  I imagine this will make switching servers really easy now.</p>

<p><strong>Update (January 23, 2007):</strong> To upgrade to WordPress 2.1:</p>

<ol>
<li>Disable all plugins (take a screenshot first)</li>
<li>Run this command:</li>
</ol>

<pre><code>svn switch http://svn.automattic.com/wordpress/branches/2.1/</code></pre>

<ol>
<li>Go to your admin screen and update the database when prompted.</li>
<li>Enable your plugins again.</li>
</ol>

<p><strong>Update (May 22, 2007):</strong> Just upgraded to version 2.2</p>
]]></content:encoded>
			<wfw:commentRss>http://solutions.treypiepmeier.com/2006/10/08/using-subversion-to-upgrade-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Functional WP_Shortstat</title>
		<link>http://solutions.treypiepmeier.com/2006/09/20/functional-wp_shortstat/</link>
		<comments>http://solutions.treypiepmeier.com/2006/09/20/functional-wp_shortstat/#comments</comments>
		<pubDate>Wed, 20 Sep 2006 08:07:22 +0000</pubDate>
		<dc:creator>Trey</dc:creator>
				<category><![CDATA[Stats]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://solutions.treypiepmeier.com/2006/09/20/functional-wp_shortstat/</guid>
		<description><![CDATA[The official wp_shortsat page gives you a version that no longer works with WordPress. Get a good one here. It&#8217;s even blue to match the rest of WP Admin.]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://dev.wp-plugins.org/wiki/wp-shortstat">official wp_shortsat page</a> gives you a version that no longer works with WordPress.  <a href="http://www.webkeydesign.com/107/wordpress-20-shortstat-plugin/">Get a good one here.</a> It&#8217;s even blue to match the rest of WP Admin.</p>
]]></content:encoded>
			<wfw:commentRss>http://solutions.treypiepmeier.com/2006/09/20/functional-wp_shortstat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
