<?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>Shannon Coen &#187; Wordpress</title>
	<atom:link href="http://shannoncoen.com/category/computers/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://shannoncoen.com</link>
	<description></description>
	<lastBuildDate>Sat, 31 Oct 2009 06:58:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Allowed memory size exhausted</title>
		<link>http://shannoncoen.com/2009/09/30/llowed-memory-size-exhausted/</link>
		<comments>http://shannoncoen.com/2009/09/30/llowed-memory-size-exhausted/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 04:34:49 +0000</pubDate>
		<dc:creator>Shannon</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://shannoncoen.com/?p=663</guid>
		<description><![CDATA[A few minor versions ago I found that the automatic feature to upgrade the core Wordpress engine stopped working. Specifically, upon clicking the &#8216;Upgrade Automatically&#8217; button, the process said it was downloading the zip but then just hung. I&#8217;ve been putting off troubleshooting it. 
Upon looking at the PHP log, I saw the following error:
PHP [...]]]></description>
			<content:encoded><![CDATA[<p>A few minor versions ago I found that the automatic feature to upgrade the core Wordpress engine stopped working. Specifically, upon clicking the &#8216;Upgrade Automatically&#8217; button, the process said it was downloading the zip but then just hung. I&#8217;ve been putting off troubleshooting it. </p>
<p>Upon looking at the PHP log, I saw the following error:</p>
<blockquote><p>PHP Fatal error:  Allowed memory size of 33554432 bytes exhausted (tried to allocate 2357046 bytes)</p></blockquote>
<p>This means that the process needs more memory (RAM) to run that it is allowed. With a little research I found tha<a  href="http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP">t the solution is in the Wordpress documentation</a>. </p>
<p>By adding the following line to wp-config.php, we boost the limit of memory which may be allocated to Wordpress processes.</p>
<blockquote><p>define(&#8217;WP_MEMORY_LIMIT&#8217;, &#8216;64M&#8217;);</p></blockquote>
<p>Sure enough, after updating the file the upgrade ran successfully.</p>
]]></content:encoded>
			<wfw:commentRss>http://shannoncoen.com/2009/09/30/llowed-memory-size-exhausted/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Page Index with Custom Fields</title>
		<link>http://shannoncoen.com/2008/10/30/page-index-with-custom-fields/</link>
		<comments>http://shannoncoen.com/2008/10/30/page-index-with-custom-fields/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 21:04:52 +0000</pubDate>
		<dc:creator>Shannon</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://shalako.net/?p=192</guid>
		<description><![CDATA[My index of DJ Mixes is entirely dynamic. That is, when I add a new mix I don&#8217;t have to manually update this page. Here&#8217;s how I did it.
First I created an empty page called DJ Mixes. Then I created a child page for each mix and added two custom fields for year and genre. [...]]]></description>
			<content:encoded><![CDATA[<p>My index of <a  href="http://redlightmusic.com/shalako/dj-mixes/" target="_blank">DJ Mixes</a> is entirely dynamic. That is, when I add a new mix I don&#8217;t have to manually update this page. Here&#8217;s how I did it.<span id="more-192"></span></p>
<p>First I created an empty page called DJ Mixes. Then I created a child page for each mix and added two custom fields for year and genre. With this done, I had all the content I needed. The rest the work was to build the DJ Mix index page.</p>
<p>I made a copy of the <em>page.php</em> template file called <em>dj-mixes.php</em>. I updated the DJ Mixes page to use this file as a template. Then I replaced this:</p>
<pre class="brush: php">
&lt;div class=&quot;postcontent&quot;&gt;&lt;?php the_content(__(&#039;&lt;br/&gt;Continue reading...&#039;)); ?&gt;&lt;/div&gt;
</pre>
<p>with this:</p>
<pre class="brush: php">
&lt;?php
    $djmixes = get_pages(&#039;child_of=&#039;.$post-&gt;ID.&#039;&amp;sort_column=menu_order&#039;);
    foreach ($djmixes as $djmix) {
        $mix = &#039;&lt;div class=&quot;djmix&quot;&gt;&#039;.&quot;\n&quot;;
        $mix .= &#039;&lt;div class=&quot;djmixyear&quot;&gt;&#039;.get_post_meta($djmix-&gt;ID,&#039;Year&#039;,true).&#039;&lt;/div&gt;&#039;;
        $mix .= &#039;&lt;div class=&quot;djmixtitle&quot;&gt;&lt;a href=&quot;&#039;.get_page_link($djmix-&gt;ID).&#039;&quot;&gt;&#039;.$djmix-&gt;post_title.&#039;&lt;/a&gt;&lt;/div&gt;&#039;;
        $mix .= &#039;&lt;div class=&quot;djmixgenre&quot;&gt;&#039;.get_post_meta($djmix-&gt;ID,&#039;Genre&#039;,true).&#039;&lt;/div&gt;&#039;.&quot;\n&quot;;
        $mix .= &#039;&lt;/div&gt;&#039;.&quot;\n&quot;;
        echo $mix;
    }
?&gt;
</pre>
<p>The <a  href="http://codex.wordpress.org/Function_Reference/get_pages" target="_blank">get_pages</a> statement returns an array of all the information associated with pages which are children of the current page. Then we create a loop which displays the values for custom field Year, the page title, and custom field Genre for each of the child pages. This is done using <a  href="http://codex.wordpress.org/Using_Custom_Fields#Advanced_Techniques_for_Custom_Fields" target="_blank">get_post_meta</a>.</p>
<p>Here&#8217;s the associated CSS:</p>
<pre class="brush: css">
.djmix {clear:left;}
.djmixyear {float: left;width: 50px;}
.djmixtitle {float: left;width: 200px;}
.djmixgenre {float: left;width: 150px;}
</pre>
<p>If you can think of a more elegant way to do this, please let me know! I&#8217;m eager to learn more efficient practices.</p>
<p>I had quite a bit of trouble getting this code to appear right just using &#8216;code&#8217; and &#8216;pre&#8217; in my markup. Finally found <a  href="http://www.cagintranet.com/archive/the-definitive-guide-on-wordpress-syntax-highligher-plugins/" target="_blank">The Definitive Guide on Wordpress Syntax Highligher Plugins</a> which led me to the <a  href="http://wordpress.org/extend/plugins/syntaxhighlighter-plus/" target="_blank">SyntaxHighlighter Plus</a> plugin.</p>
]]></content:encoded>
			<wfw:commentRss>http://shannoncoen.com/2008/10/30/page-index-with-custom-fields/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
