<?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>Murky &#187; Wordpress</title>
	<atom:link href="http://www.murky.org/blg/category/geeky/computing/general-site-news/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.murky.org/blg</link>
	<description>Tending to Geekiness</description>
	<lastBuildDate>Thu, 22 Jul 2010 06:20:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Running WordPress on Mac OS X</title>
		<link>http://www.murky.org/blg/2010/02/running-wordpress-on-mac-os-x/</link>
		<comments>http://www.murky.org/blg/2010/02/running-wordpress-on-mac-os-x/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 15:34:28 +0000</pubDate>
		<dc:creator>Murk</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[local]]></category>
		<category><![CDATA[MAMP]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[thematic]]></category>
		<category><![CDATA[Themes]]></category>

		<guid isPermaLink="false">http://www.murky.org/blg/?p=5310</guid>
		<description><![CDATA[In which I make a local copy of this site, and them manage modifications to it on OS X.]]></description>
			<content:encoded><![CDATA[<p>For a while, I&#8217;ve been wanting to install wordpress on Mac OS X, so that when I modify themes I can do this offline for testing. I also want to have the theme modifications automatically upload to the servers and to mirror the site database on my local copy.</p>
<p>The information how to do this is &#8216;out there&#8217; &#8211; but I thought it would be good to collect it all in one place. Much of this could be adapted for other platforms such as windows or Unix. Pick and mix what you need, this is what I&#8217;ve done.</p>
<p>As always with this sort of thing, it&#8217;s your own responsibility if you mess up &#8211; understand each command before you type it. If in doubt, type man command, e.g. man rf  )</p>
<p>(...)<br/>Read the rest of <a href="http://www.murky.org/blg/2010/02/running-wordpress-on-mac-os-x/">Running WordPress on Mac OS X</a> (795 words)</p>
<hr />
<p><small><a href="http://www.murky.org/blg/2010/02/running-wordpress-on-mac-os-x/">Link - (Come and Comment - I like comments!)</a> | Original : <a href="http://www.murky.org/blg/2010/02/running-wordpress-on-mac-os-x/">Running WordPress on Mac OS X</a> |
© <a href="http://www.murky.org/blg">Murky</a>, 2010. |
Add to
<a href="http://del.icio.us/post?url=http://www.murky.org/blg/2010/02/running-wordpress-on-mac-os-x/&title=Running WordPress on Mac OS X">del.icio.us</a>
<br/>
Post tags: <a href="http://www.murky.org/blg/tag/bash/" rel="tag">bash</a>, <a href="http://www.murky.org/blg/tag/local/" rel="tag">local</a>, <a href="http://www.murky.org/blg/tag/mamp/" rel="tag">MAMP</a>, <a href="http://www.murky.org/blg/tag/os-x/" rel="tag">OS X</a>, <a href="http://www.murky.org/blg/tag/scripts/" rel="tag">scripts</a>, <a href="http://www.murky.org/blg/tag/thematic/" rel="tag">thematic</a>, <a href="http://www.murky.org/blg/tag/themes/" rel="tag">Themes</a>, <a href="http://www.murky.org/blg/tag/wordpress/" rel="tag">Wordpress</a><br/>
</small></p>
	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.murky.org/blg/2010/02/wordpress-backup-on-demand-to-os-x/" title="WordPress backup on demand to OS X (February 15, 2010)">WordPress backup on demand to OS X</a> (0)</li>
	<li><a href="http://www.murky.org/blg/2009/01/thematic-functionsphp-problem-solved/" title="Thematic &#8211; functions.php problem solved (January 2, 2009)">Thematic &#8211; functions.php problem solved</a> (0)</li>
	<li><a href="http://www.murky.org/blg/2009/01/thematic-functionsphp-problem/" title="Thematic &#8211; functions.php problem (January 1, 2009)">Thematic &#8211; functions.php problem</a> (2)</li>
	<li><a href="http://www.murky.org/blg/2008/12/wordpress-theme-style-declarations/" title="WordPress Theme Style Declarations (December 22, 2008)">WordPress Theme Style Declarations</a> (1)</li>
	<li><a href="http://www.murky.org/blg/2010/02/updated-code-for-series-posts/" title="Updated Code for Series Posts (February 6, 2010)">Updated Code for Series Posts</a> (2)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.murky.org/blg/2010/02/running-wordpress-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updated Code for Series Posts</title>
		<link>http://www.murky.org/blg/2010/02/updated-code-for-series-posts/</link>
		<comments>http://www.murky.org/blg/2010/02/updated-code-for-series-posts/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 11:56:35 +0000</pubDate>
		<dc:creator>Murk</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[thematic]]></category>

		<guid isPermaLink="false">http://www.murky.org/blg/?p=5207</guid>
		<description><![CDATA[In which I solve a long standing problem within a short time of not knowing where to start]]></description>
			<content:encoded><![CDATA[<p>I just posted about a problem with series posts. Almost immediately I solved it.</p>
<p>I&#8217;m not <em>really</em> ready for this to go public &#8211; as all it does is tag the posts (I really want to only show the HTML of those posts), but I wanted to check that my manual remedy for ensuring that posting code doesn&#8217;t do funny things to my friend&#8217;s RSS reader works (see <a href="http://www.murky.org/blg/series-posting-in-wordpress/#comment-78030">comment on previous</a>). I&#8217;ve tried to prevent this by using a &#8216;read more&#8217; tag as that should stop the RSS at that point.</p>
<p>Ultimately, I&#8217;d want to have the software automatically trim down the lines so I don&#8217;t have to rely on doing this manually.</p>
<p>This code tags the first/last/prev and next posts, and then uses CSS to clean it up.<br />
(...)<br/>Read the rest of <a href="http://www.murky.org/blg/2010/02/updated-code-for-series-posts/">Updated Code for Series Posts</a> (504 words)</p>
<hr />
<p><small><a href="http://www.murky.org/blg/2010/02/updated-code-for-series-posts/">Link - (Come and Comment - I like comments!)</a> | Original : <a href="http://www.murky.org/blg/2010/02/updated-code-for-series-posts/">Updated Code for Series Posts</a> |
© <a href="http://www.murky.org/blg">Murky</a>, 2010. |
Add to
<a href="http://del.icio.us/post?url=http://www.murky.org/blg/2010/02/updated-code-for-series-posts/&title=Updated Code for Series Posts">del.icio.us</a>
<br/>
Post tags: <a href="http://www.murky.org/blg/tag/code/" rel="tag">code</a>, <a href="http://www.murky.org/blg/tag/functionsphp/" rel="tag">functions.php</a>, <a href="http://www.murky.org/blg/tag/php/" rel="tag">php</a>, <a href="http://www.murky.org/blg/tag/thematic/" rel="tag">thematic</a>, <a href="http://www.murky.org/blg/tag/wordpress/" rel="tag">Wordpress</a><br/>
</small></p>
	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.murky.org/blg/2010/02/series-posting-in-wordpress/" title="Series Posting in WordPress (February 6, 2010)">Series Posting in WordPress</a> (3)</li>
	<li><a href="http://www.murky.org/blg/2009/02/thematic-child-theme-post-footer-modification/" title="Thematic Child Theme &#8211; Post Footer Modification (February 15, 2009)">Thematic Child Theme &#8211; Post Footer Modification</a> (2)</li>
	<li><a href="http://www.murky.org/blg/2009/01/thematic-functionsphp-problem-solved/" title="Thematic &#8211; functions.php problem solved (January 2, 2009)">Thematic &#8211; functions.php problem solved</a> (0)</li>
	<li><a href="http://www.murky.org/blg/2009/01/thematic-functionsphp-problem/" title="Thematic &#8211; functions.php problem (January 1, 2009)">Thematic &#8211; functions.php problem</a> (2)</li>
	<li><a href="http://www.murky.org/blg/2009/01/thematic-a-problem-with-php/" title="Thematic &#8211; A problem with php (January 11, 2009)">Thematic &#8211; A problem with php</a> (6)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.murky.org/blg/2010/02/updated-code-for-series-posts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Series Posting in WordPress</title>
		<link>http://www.murky.org/blg/2010/02/series-posting-in-wordpress/</link>
		<comments>http://www.murky.org/blg/2010/02/series-posting-in-wordpress/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 09:32:03 +0000</pubDate>
		<dc:creator>Murk</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[thematic]]></category>

		<guid isPermaLink="false">http://www.murky.org/blg/?p=5204</guid>
		<description><![CDATA[In which I talk series links]]></description>
			<content:encoded><![CDATA[<p>In my <a href="http://www.mattvarone.com/wordpress/functionsphp-wordpress-themes/">functions.ph</a>p file, I have some code which implements series posting. This relies on the <a href="http://themeshaper.com/thematic/">thematic framework</a> </p>
<pre class="brush: php;">
function childtheme_article_footer($footer) {
	// This variable is the stuff I put before the regular footer
	$extra_stuff='';

	global $id, $post;
	$series = get_post_meta($post-&gt;ID, 'Series', true);
	$pstlink = get_permalink();
	$psttitle = get_the_title();
	$pstbody = get_the_excerpt();

	// Check for a 'series' as a custom field - if there is one, grab the value contained
	if($series) :
		$args = array(
			'numberposts' =&gt; -1,
			'meta_key' =&gt; 'Series',
			'meta_value' =&gt; $series,
		);

		// This bit grabs the series posts, and stores the HTML linking to them in $extra_stuff variable
		$series_posts = get_posts($args);
		if($series_posts) :
			$class = preg_replace(&quot;/[^a-z0-9\&#92;&#48;40\\.\\-\\_\\\\]/i&quot;, &quot;&quot;, $series);
			$class = strtolower(str_replace(array(' ', ' '), '-', $class));
			if (is_single()) {
				$extra_stuff = '&lt;div class=&quot;series series-' . $class . '&quot;&gt;&lt;h4 class=&quot;series-title&quot;&gt;' . __('Articles in this series') . '&lt;/h4&gt;&lt;ul&gt;';
				foreach($series_posts as $serial) :
					if($serial-&gt;ID == $post-&gt;ID)
						$extra_stuff = $extra_stuff . '&lt;li class=&quot;current-post&quot;&gt;' . $serial-&gt;post_title . '&lt;/li&gt;';
					else
					$extra_stuff = $extra_stuff .  '&lt;li&gt;&lt;a href=&quot;' . get_permalink($serial-&gt;ID) . '&quot; class=&quot;postID_' . $serial-&gt;ID . '&quot; title=&quot;' . str_replace('&quot;', '&quot;', $serial-&gt;post_title) . '&quot;&gt;' . str_replace('&quot;', '&quot;', $serial-&gt;post_title) . '&lt;/a&gt;&lt;/li&gt;';
				endforeach;
				$extra_stuff = $extra_stuff .  '&lt;/ul&gt;&lt;/div&gt;';
			} else {
                                $extra_stuff = $extra_stuff .  '&lt;div class=&quot;series series-' . $class . '&quot;&gt;';
                                $extra_stuff = $extra_stuff .  '&lt;h4 class=&quot;series-title&quot;&gt;&lt;a href=&quot;' . $pstlink . '&quot;&gt;' . $psttitle . '&lt;/a&gt;';
                                $extra_stuff = $extra_stuff .  ' is part of a series' . '&lt;/h4&gt;&lt;/div&gt;';
                        }
		endif;
	endif;

       // This is irrelevant to series list, but it does add twitter links and the like
	$pageurl = get_bloginfo('siteurl');
        $pageurl = $pageurl . &quot;?p=&quot; . $post-&gt;ID;
	$extra_stuff_post = '&lt;div class=&quot;socialnetwork&quot;&gt;&lt;ul&gt;';
	$extra_stuff_post = $extra_stuff_post . '&lt;li&gt;Send to: &lt;a class=&quot;twitterlink&quot; href=&quot;http://twitter.com/home?status=Currently reading ' . $pageurl . '&quot; title=&quot;Click to send ' . $psttitle . ' to Twitter!&quot; target=&quot;_blank&quot;&gt;Twitter&lt;/a&gt;&lt;/li&gt;';
	$extra_stuff_post = $extra_stuff_post . '&lt;li&gt;&lt;a class=&quot;deliciouslink&quot; href=&quot;http://del.icio.us/post?url=' . $pstlink . '&amp;title=' . $psttitle . '&quot; title=&quot;Click to bookmark ' . $psttitle . ' on del.icio.us!&quot; target=&quot;_blank&quot;&gt;del.icio.us&lt;/a&gt;&lt;/li&gt;';
	$extra_stuff_post = $extra_stuff_post . '&lt;li&gt;&lt;a class=&quot;digglink&quot; href=&quot;http://digg.com/submit?phase=2&amp;url=' . $pstlink . '&amp;title='. $psttitle . '&amp;bodytext=' . $pstbody . '&quot; title=&quot;Click to bookmark ' . $psttitle . ' on Digg!&quot; target=&quot;_blank&quot;&gt;Digg&lt;/a&gt;&lt;/li&gt;';
	$rss_url = get_bloginfo('rss2_url');
	$extra_stuff_post = $extra_stuff_post . '&lt;li&gt;Use the: &lt;a class=&quot;rsslink&quot; href=&quot;' . $rss_url . '&quot; title=&quot;Click to Subscribe to the Feed&quot;  rel=&quot;alternate&quot; type=&quot;application/rss+xml&quot; target=&quot;_blank&quot;&gt;RSS Feed&lt;/a&gt;&lt;/li&gt;';
	$extra_stuff_post = $extra_stuff_post . '&lt;/ul&gt;&lt;/div&gt;';

	// This slams it all together at the end of the post
	$footer = $extra_stuff . $footer . $extra_stuff_post;
	return $footer;
}

// This replaces thematics stuff with mine
add_action('thematic_postfooter','childtheme_article_footer');
</pre>
<p>It&#8217;s been a while since I did this, and my aim of tidying the output is now further away than it was. What I want is for the code to ONLY output the first post in a series, the previous post, the current post (with no link), the next post and the last post. If any of these posts are one and the same, they would only be output once.</p>
<p>I&#8217;m really drawing a bit of a blank on how to do this &#8211; though I sense I&#8217;m missing a trick. If anyone has any bright ideas, I&#8217;d be glad to hear them.</p>
<hr />
<p><small><a href="http://www.murky.org/blg/2010/02/series-posting-in-wordpress/">Link - (Come and Comment - I like comments!)</a> | Original : <a href="http://www.murky.org/blg/2010/02/series-posting-in-wordpress/">Series Posting in WordPress</a> |
© <a href="http://www.murky.org/blg">Murky</a>, 2010. |
Add to
<a href="http://del.icio.us/post?url=http://www.murky.org/blg/2010/02/series-posting-in-wordpress/&title=Series Posting in WordPress">del.icio.us</a>
<br/>
Post tags: <a href="http://www.murky.org/blg/tag/code/" rel="tag">code</a>, <a href="http://www.murky.org/blg/tag/functionsphp/" rel="tag">functions.php</a>, <a href="http://www.murky.org/blg/tag/php/" rel="tag">php</a>, <a href="http://www.murky.org/blg/tag/thematic/" rel="tag">thematic</a>, <a href="http://www.murky.org/blg/tag/wordpress/" rel="tag">Wordpress</a><br/>
</small></p>
	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.murky.org/blg/2010/02/updated-code-for-series-posts/" title="Updated Code for Series Posts (February 6, 2010)">Updated Code for Series Posts</a> (2)</li>
	<li><a href="http://www.murky.org/blg/2009/02/thematic-child-theme-post-footer-modification/" title="Thematic Child Theme &#8211; Post Footer Modification (February 15, 2009)">Thematic Child Theme &#8211; Post Footer Modification</a> (2)</li>
	<li><a href="http://www.murky.org/blg/2009/01/thematic-functionsphp-problem-solved/" title="Thematic &#8211; functions.php problem solved (January 2, 2009)">Thematic &#8211; functions.php problem solved</a> (0)</li>
	<li><a href="http://www.murky.org/blg/2009/01/thematic-functionsphp-problem/" title="Thematic &#8211; functions.php problem (January 1, 2009)">Thematic &#8211; functions.php problem</a> (2)</li>
	<li><a href="http://www.murky.org/blg/2009/01/thematic-a-problem-with-php/" title="Thematic &#8211; A problem with php (January 11, 2009)">Thematic &#8211; A problem with php</a> (6)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.murky.org/blg/2010/02/series-posting-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>iPhone/iPod Touch</title>
		<link>http://www.murky.org/blg/2009/09/iphoneipod-touch/</link>
		<comments>http://www.murky.org/blg/2009/09/iphoneipod-touch/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 22:11:53 +0000</pubDate>
		<dc:creator>Murk</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[ipod]]></category>
		<category><![CDATA[ipod touch]]></category>

		<guid isPermaLink="false">http://www.murky.org/blg/?p=5085</guid>
		<description><![CDATA[In which I customise the site for the small screen... okay, I installed a plugin]]></description>
			<content:encoded><![CDATA[<p>This site is now optimised for viewing on an iPhone or iPod touch. It should not affect web viewing.</p>
<p>Please do try it and see &#8211; I&#8217;ve just added it to my home screen on the iPod, but then, I would&#8230;.</p>
<hr />
<p><small><a href="http://www.murky.org/blg/2009/09/iphoneipod-touch/">Link - (Come and Comment - I like comments!)</a> | Original : <a href="http://www.murky.org/blg/2009/09/iphoneipod-touch/">iPhone/iPod Touch</a> |
© <a href="http://www.murky.org/blg">Murky</a>, 2009. |
Add to
<a href="http://del.icio.us/post?url=http://www.murky.org/blg/2009/09/iphoneipod-touch/&title=iPhone/iPod Touch">del.icio.us</a>
<br/>
Post tags: <a href="http://www.murky.org/blg/tag/iphone/" rel="tag">iphone</a>, <a href="http://www.murky.org/blg/tag/ipod/" rel="tag">ipod</a>, <a href="http://www.murky.org/blg/tag/ipod-touch/" rel="tag">ipod touch</a>, <a href="http://www.murky.org/blg/tag/wordpress/" rel="tag">Wordpress</a><br/>
</small></p>
	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.murky.org/blg/2009/08/test-post/" title="Test Post from iPod (August 20, 2009)">Test Post from iPod</a> (0)</li>
	<li><a href="http://www.murky.org/blg/2008/12/wordpress-theme-style-declarations/" title="WordPress Theme Style Declarations (December 22, 2008)">WordPress Theme Style Declarations</a> (1)</li>
	<li><a href="http://www.murky.org/blg/2010/02/wordpress-backup-on-demand-to-os-x/" title="WordPress backup on demand to OS X (February 15, 2010)">WordPress backup on demand to OS X</a> (0)</li>
	<li><a href="http://www.murky.org/blg/2009/01/wordpress-271-update/" title="WordPress 2.7.1 update (January 26, 2009)">WordPress 2.7.1 update</a> (0)</li>
	<li><a href="http://www.murky.org/blg/2009/01/wordpress-271/" title="WordPress 2.7.1 (January 25, 2009)">WordPress 2.7.1</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.murky.org/blg/2009/09/iphoneipod-touch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thematic Child Theme &#8211; Post Footer Modification</title>
		<link>http://www.murky.org/blg/2009/02/thematic-child-theme-post-footer-modification/</link>
		<comments>http://www.murky.org/blg/2009/02/thematic-child-theme-post-footer-modification/#comments</comments>
		<pubDate>Sun, 15 Feb 2009 12:20:30 +0000</pubDate>
		<dc:creator>Murk</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Child Theme]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[Murkymatic]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[thematic]]></category>

		<guid isPermaLink="false">http://www.murky.org/blg/?p=4542</guid>
		<description><![CDATA[In which I post some php for a function in a WordPress child theme, which links posts which are in a series, as well as adding social bookmarking links.]]></description>
			<content:encoded><![CDATA[<p>For this site, I use &#8216;<a href="http://www.murky.org/blg/murkymatic/">Murkymatic</a>&#8216; which is a child theme of &#8216;Thematic&#8217;.</p>
<p>I wanted to amend the footer on each post to allow me to link posts which are in a series. I add a custom field to posts in a series, and I want to pick that up, and automatically link the posts.</p>
<p>I&#8217;ve now done this, <a href="http://www.murky.org/blg/thematic-a-problem-with-php/#comment-72830">following a little help from a commenter</a> which told me something relatively easy that I just didn&#8217;t know &#8211; the resulting code is shown below and is currently in my functions.php file. I&#8217;ve also added social bookmarking links.</p>
<blockquote><p><code>function childtheme_article_footer($footer) {<br />
     $extra_stuff='';</code></p>
<p><code>     global $id, $post;<br />
     $series = get_post_meta($post-&gt;ID, 'Series', true);<br />
     $pstlink = get_permalink();<br />
     $psttitle = get_the_title();<br />
     $pstbody = get_the_excerpt();<br />
     if($series) :<br />
          $args = array(<br />
               'numberposts' =&gt; -1,<br />
               'meta_key' =&gt; 'Series',<br />
               'meta_value' =&gt; $series,<br />
          );<br />
          $series_posts = get_posts($args);<br />
          if($series_posts) :<br />
               $class = preg_replace("/[^a-z0-9\\040\\.\\-\\_\\\\]/i", "", $series);<br />
               $class = strtolower(str_replace(array(' ', ' '), '-', $class));<br />
               if (is_single()) {<br />
                    $extra_stuff = '&lt;div class="series series-' . $class . '"&gt;&lt;h4 class="series-title"&gt;' . __('Articles in this series') . '&lt;/h4&gt;&lt;ul&gt;';<br />
                    foreach($series_posts as $serial) :<br />
                         if($serial-&gt;ID == $post-&gt;ID)<br />
                              $extra_stuff = $extra_stuff . '&lt;li class="current-post"&gt;' . $serial-&gt;post_title . '&lt;/li&gt;';<br />
                         else<br />
                         $extra_stuff = $extra_stuff .  '&lt;li&gt;&lt;a href="' . get_permalink($serial-&gt;ID) . '" class="postID_' . $serial-&gt;ID . '" title="' . str_replace('"', '"', $serial-&gt;post_title) . '"&gt;' . str_replace('"', '"', $serial-&gt;post_title) . '&lt;/a&gt;&lt;/li&gt;';<br />
                    endforeach;<br />
                    $extra_stuff = $extra_stuff .  '&lt;/ul&gt;&lt;/div&gt;';<br />
               } else {<br />
               $extra_stuff = $extra_stuff .  '&lt;div class="series series-' . $class . '"&gt;';<br />
               $extra_stuff = $extra_stuff .  '&lt;h4 class="series-title"&gt;&lt;a href="' . $pstlink . '"&gt;' . $psttitle . '&lt;/a&gt;';<br />
               $extra_stuff = $extra_stuff .  ' is part of a series' . '&lt;/h4&gt;&lt;/div&gt;';<br />
          }<br />
          endif;<br />
     endif;</code></p>
<p><code>     $extra_stuff_post = '&lt;div class="socialnetwork"&gt;&lt;ul&gt;';<br />
     $extra_stuff_post = $extra_stuff_post . '&lt;li&gt;Send to: &lt;a class="twitterlink" href="http://twitter.com/home?status=Currently reading ' . $pstlink . '" title="Click to send ' . $psttitle . ' to Twitter!" target="_blank"&gt;Twitter&lt;/a&gt;&lt;/li&gt;';<br />
     $extra_stuff_post = $extra_stuff_post . '&lt;li&gt;&lt;a class="deliciouslink" href="http://del.icio.us/post?url=' . $pstlink . '&amp;title=' . $psttitle . '" title="Click to bookmark ' . $psttitle . ' on del.icio.us!" target="_blank"&gt;del.icio.us&lt;/a&gt;&lt;/li&gt;';<br />
     $extra_stuff_post = $extra_stuff_post . '&lt;li&gt;&lt;a class="digglink" href="http://digg.com/submit?phase=2&amp;url=' . $pstlink . '&amp;title='. $psttitle . '&amp;bodytext=' . $pstbody . '" title="Click to bookmark ' . $psttitle . ' on Digg!" target="_blank"&gt;Digg&lt;/a&gt;&lt;/li&gt;';<br />
     $rss_url = get_bloginfo('rss2_url');<br />
     $extra_stuff_post = $extra_stuff_post . '&lt;li&gt;Use the: &lt;a class="rsslink" href="' . $rss_url . '" title="Click to Subscribe to the Feed"  rel="alternate" type="application/rss+xml" target="_blank"&gt;RSS Feed&lt;/a&gt;&lt;/li&gt;';<br />
     $extra_stuff_post = $extra_stuff_post . '&lt;/ul&gt;&lt;/div&gt;';</code></p>
<p><code>     $footer = $extra_stuff . $footer . $extra_stuff_post;<br />
     return $footer;<br />
}</code></p>
<p><code>add_action('thematic_postfooter','childtheme_article_footer');</code></p></blockquote>
<p>Where I want to include a post in a series, I add a custom field imaginatively called &#8216;Series&#8217; and give that series a name. Any post sharing that series name is included.</p>
<p>What I now want to do is to modify the function above to show a restricted listing of the series, e.g. First in Series, Previous in Series, Next in Series, Last in Series&#8230;. except, perhaps, for the first post in the series which would show the entire sequence.  I&#8217;m not quite sure of how to do this neatly, the best I can think of is to do two passes through the list of post IDs to find the relevant IDs. I&#8217;d appreciate any input.</p>
<hr />
<p><small><a href="http://www.murky.org/blg/2009/02/thematic-child-theme-post-footer-modification/">Link - (Come and Comment - I like comments!)</a> | Original : <a href="http://www.murky.org/blg/2009/02/thematic-child-theme-post-footer-modification/">Thematic Child Theme &#8211; Post Footer Modification</a> |
© <a href="http://www.murky.org/blg">Murky</a>, 2009. |
Add to
<a href="http://del.icio.us/post?url=http://www.murky.org/blg/2009/02/thematic-child-theme-post-footer-modification/&title=Thematic Child Theme &#8211; Post Footer Modification">del.icio.us</a>
<br/>
Post tags: <a href="http://www.murky.org/blg/tag/child-theme/" rel="tag">Child Theme</a>, <a href="http://www.murky.org/blg/tag/functionsphp/" rel="tag">functions.php</a>, <a href="http://www.murky.org/blg/tag/murkymatic/" rel="tag">Murkymatic</a>, <a href="http://www.murky.org/blg/tag/php/" rel="tag">php</a>, <a href="http://www.murky.org/blg/tag/thematic/" rel="tag">thematic</a>, <a href="http://www.murky.org/blg/tag/wordpress/" rel="tag">Wordpress</a><br/>
</small></p>
	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.murky.org/blg/2009/01/thematic-a-problem-with-php/" title="Thematic &#8211; A problem with php (January 11, 2009)">Thematic &#8211; A problem with php</a> (6)</li>
	<li><a href="http://www.murky.org/blg/murkymatic/" title="Murkymatic (January 1, 2009)">Murkymatic</a> (1)</li>
	<li><a href="http://www.murky.org/blg/2010/02/updated-code-for-series-posts/" title="Updated Code for Series Posts (February 6, 2010)">Updated Code for Series Posts</a> (2)</li>
	<li><a href="http://www.murky.org/blg/2010/02/series-posting-in-wordpress/" title="Series Posting in WordPress (February 6, 2010)">Series Posting in WordPress</a> (3)</li>
	<li><a href="http://www.murky.org/blg/2009/01/thematic-functionsphp-problem-solved/" title="Thematic &#8211; functions.php problem solved (January 2, 2009)">Thematic &#8211; functions.php problem solved</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.murky.org/blg/2009/02/thematic-child-theme-post-footer-modification/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WordPress 2.7.1 update</title>
		<link>http://www.murky.org/blg/2009/01/wordpress-271-update/</link>
		<comments>http://www.murky.org/blg/2009/01/wordpress-271-update/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 07:15:52 +0000</pubDate>
		<dc:creator>Murk</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Blogging]]></category>
		<category><![CDATA[trac]]></category>

		<guid isPermaLink="false">http://www.murky.org/blg/?p=4368</guid>
		<description><![CDATA[In which I note that the number of unresolved Wordpress 2.7.1 problems goes up by 4%.]]></description>
			<content:encoded><![CDATA[<p>Regarding <a href="http://www.murky.org/blg/wordpress-271/">the release of WordPress 2.7.1</a>, the number of open tickets has gone up to 52.</p>
<p>With the deadline 17 hours away, it looks really tight. It&#8217;ll be interesting to see if they make it.</p>
<hr />
<p><small><a href="http://www.murky.org/blg/2009/01/wordpress-271-update/">Link - (Come and Comment - I like comments!)</a> | Original : <a href="http://www.murky.org/blg/2009/01/wordpress-271-update/">WordPress 2.7.1 update</a> |
© <a href="http://www.murky.org/blg">Murky</a>, 2009. |
Add to
<a href="http://del.icio.us/post?url=http://www.murky.org/blg/2009/01/wordpress-271-update/&title=WordPress 2.7.1 update">del.icio.us</a>
<br/>
Post tags: <a href="http://www.murky.org/blg/tag/blogging/" rel="tag">Blogging</a>, <a href="http://www.murky.org/blg/tag/trac/" rel="tag">trac</a>, <a href="http://www.murky.org/blg/tag/wordpress/" rel="tag">Wordpress</a><br/>
</small></p>
	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.murky.org/blg/2009/01/wordpress-271/" title="WordPress 2.7.1 (January 25, 2009)">WordPress 2.7.1</a> (0)</li>
	<li><a href="http://www.murky.org/blg/2008/12/wordpress-theme-style-declarations/" title="WordPress Theme Style Declarations (December 22, 2008)">WordPress Theme Style Declarations</a> (1)</li>
	<li><a href="http://www.murky.org/blg/2010/02/wordpress-backup-on-demand-to-os-x/" title="WordPress backup on demand to OS X (February 15, 2010)">WordPress backup on demand to OS X</a> (0)</li>
	<li><a href="http://www.murky.org/blg/2008/12/wordpress-the-big-change/" title="WordPress &#8211; The Big Change (December 7, 2008)">WordPress &#8211; The Big Change</a> (2)</li>
	<li><a href="http://www.murky.org/blg/2009/02/wordle-for-mid-february/" title="Wordle for Mid February (February 15, 2009)">Wordle for Mid February</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.murky.org/blg/2009/01/wordpress-271-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress 2.7.1</title>
		<link>http://www.murky.org/blg/2009/01/wordpress-271/</link>
		<comments>http://www.murky.org/blg/2009/01/wordpress-271/#comments</comments>
		<pubDate>Sun, 25 Jan 2009 15:53:50 +0000</pubDate>
		<dc:creator>Murk</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Blogging]]></category>
		<category><![CDATA[trac]]></category>

		<guid isPermaLink="false">http://www.murky.org/blg/?p=4362</guid>
		<description><![CDATA[In which I ponder whether tickets will start to be closed at a very fast rate.]]></description>
			<content:encoded><![CDATA[<p>According to the <a href="http://trac.wordpress.org/roadmap">WordPress roadmap</a>, version <a href="http://trac.wordpress.org/milestone/2.7.1">2.7.1 is due tomorrow</a>.</p>
<p>As I write, there are 63 closed tickets and 50 active tickets. A &#8216;ticket&#8217; is opened for every issue that needs to be resolved for that milestone.</p>
<p>Will it be done in time?</p>
<hr />
<p><small><a href="http://www.murky.org/blg/2009/01/wordpress-271/">Link - (Come and Comment - I like comments!)</a> | Original : <a href="http://www.murky.org/blg/2009/01/wordpress-271/">WordPress 2.7.1</a> |
© <a href="http://www.murky.org/blg">Murky</a>, 2009. |
Add to
<a href="http://del.icio.us/post?url=http://www.murky.org/blg/2009/01/wordpress-271/&title=WordPress 2.7.1">del.icio.us</a>
<br/>
Post tags: <a href="http://www.murky.org/blg/tag/blogging/" rel="tag">Blogging</a>, <a href="http://www.murky.org/blg/tag/trac/" rel="tag">trac</a>, <a href="http://www.murky.org/blg/tag/wordpress/" rel="tag">Wordpress</a><br/>
</small></p>
	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.murky.org/blg/2009/01/wordpress-271-update/" title="WordPress 2.7.1 update (January 26, 2009)">WordPress 2.7.1 update</a> (0)</li>
	<li><a href="http://www.murky.org/blg/2008/12/wordpress-theme-style-declarations/" title="WordPress Theme Style Declarations (December 22, 2008)">WordPress Theme Style Declarations</a> (1)</li>
	<li><a href="http://www.murky.org/blg/2010/02/wordpress-backup-on-demand-to-os-x/" title="WordPress backup on demand to OS X (February 15, 2010)">WordPress backup on demand to OS X</a> (0)</li>
	<li><a href="http://www.murky.org/blg/2008/12/wordpress-the-big-change/" title="WordPress &#8211; The Big Change (December 7, 2008)">WordPress &#8211; The Big Change</a> (2)</li>
	<li><a href="http://www.murky.org/blg/2009/02/wordle-for-mid-february/" title="Wordle for Mid February (February 15, 2009)">Wordle for Mid February</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.murky.org/blg/2009/01/wordpress-271/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thematic &#8211; A problem with php</title>
		<link>http://www.murky.org/blg/2009/01/thematic-a-problem-with-php/</link>
		<comments>http://www.murky.org/blg/2009/01/thematic-a-problem-with-php/#comments</comments>
		<pubDate>Sun, 11 Jan 2009 12:11:37 +0000</pubDate>
		<dc:creator>Murk</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Geeky]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Child Theme]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Murkymatic]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[thematic]]></category>

		<guid isPermaLink="false">http://www.murky.org/blg/?p=4182</guid>
		<description><![CDATA[In which I plea for help with a wordpress child theme issue involving hooks, php and functions.]]></description>
			<content:encoded><![CDATA[<p>I am working on a <a href="http://themeshaper.com/blog/functions-php-wordpress-child-themes/">Child Theme</a> based on the &#8216;<a href="http://themeshaper.com/thematic-for-wordpress/">Thematic</a>&#8216; framework for WordPress. For more information, see the &#8216;<a href="http://www.murky.org/blg/murkymatic/">Murkymatic</a>&#8216; pages.</p>
<p>In <a href="http://themeshaper.com/thematic-for-wordpress/">Thematic</a> there is a clever little script in <code>functions.php</code> which goes after every post and displays the tags, categories and so forth. This displays something subtly different on tags pages to category pages and so on. I like it, I want to keep it.</p>
<p>So far, so good. I want to insert into my own function into the child theme <em>after</em> the post but <em>before</em> the post footer.</p>
<p>My function, which is to show related posts <a href="http://justintadlock.com/archives/2007/11/01/wordpress-custom-fields-listing-a-series-of-posts">if a post is part of a series</a>.</p>
<p>This function works, and works well. Here it is:</p>
<blockquote><p><code>function childtheme_article_series() {<br />
    global $id, $post;<br />
    $series = get_post_meta($post-&gt;ID, 'Series', true);<br />
    if($series) :<br />
        $args = array(<br />
            'numberposts' =&gt; -1,<br />
            'meta_key' =&gt; 'Series',<br />
            'meta_value' =&gt; $series,<br />
        );<br />
        $series_posts = get_posts($args);<br />
        if($series_posts) :<br />
            $class = preg_replace("/[^a-z0-9\\040\\.\\-\\_\\\\]/i", "", $series);<br />
            $class = strtolower(str_replace(array(' ', ' '), '-', $class));<br />
            if (is_single()) {<br />
                echo '&lt;div class="series series-' . $class . '"&gt;&lt;h4 class="series-title"&gt;' . __('Articles in this series') . '&lt;/h4&gt;&lt;ul&gt;';<br />
                foreach($series_posts as $serial) :<br />
                    if($serial-&gt;ID == $post-&gt;ID)<br />
                        echo '&lt;li class="current-post"&gt;' . $serial-&gt;post_title . '&lt;/li&gt;';<br />
                    else<br />
                    echo '&lt;li&gt;&lt;a href="' . get_permalink($serial-&gt;ID) . '" title="' . str_replace('"', '"', $serial-&gt;post_title) . '"&gt;' . str_replace('"', '"', $serial-&gt;post_title) . '&lt;/a&gt;&lt;/li&gt;';<br />
                endforeach;<br />
                echo '&lt;/ul&gt;&lt;/div&gt;';<br />
            } else {<br />
                $pstlink = get_permalink();<br />
                $psttitle = get_the_title();<br />
                echo '&lt;div class="series series-' . $class . '"&gt;';<br />
                echo '&lt;h4 class="series-title"&gt;&lt;a href="' . $pstlink . '"&gt;' . $psttitle . '&lt;/a&gt;';<br />
                echo ' is part of a series' . '&lt;/h4&gt;&lt;/div&gt;';<br />
            }<br />
        endif;<br />
    endif;<br />
}</code></p></blockquote>
<p>The above code goes into the <code>functions.php</code> of my <a href="http://themeshaper.com/blog/functions-php-wordpress-child-themes/">Child Theme</a>.</p>
<p>The next step is to tell that function when to run, so I hook it into the <a href="http://themeshaper.com/thematic-for-wordpress/">Thematic</a> hook which is there for that very purpose.</p>
<p>Into my <code>functions.php</code> I add the line: <code>add_action('thematic_postfooter','childtheme_article_series');</code></p>
<p>Unfortunately, this replaces the existing <a href="http://themeshaper.com/thematic-for-wordpress/">Thematic</a> footer with my footer. This is not what I want.</p>
<p>In short, I can&#8217;t work out how to tell WordPress to run my <a href="http://themeshaper.com/blog/functions-php-wordpress-child-themes/">Child Theme</a> function, <em>then</em> to do the <a href="http://themeshaper.com/thematic-for-wordpress/">Thematic</a> parent theme function.</p>
<p>I&#8217;m at a bit of a loss right now.</p>
<p>I could recreate the existing footer in my routine &#8211; but that removes one of the advantages of the <a href="http://themeshaper.com/blog/functions-php-wordpress-child-themes/">child theme</a>, should the <a href="http://themeshaper.com/thematic-for-wordpress/">Thematic</a> code be updated, my replacement footer would not be.</p>
<p>It <em>is</em> important to be able to over-ride the parent theme&#8217;s footer, <em>but it&#8217;d be nice to be able to supplement it too</em>. What I want is to tell WordPress to run this function <em>before</em> the <code>thematic_postfooter()</code> function. I don&#8217;t want to have to edit <a href="http://themeshaper.com/thematic-for-wordpress/">Thematic</a> to do this (as this also removes the parent/<a href="http://themeshaper.com/blog/functions-php-wordpress-child-themes/">Child Theme</a> advantage). Though I did try this, and it caused a server 500 error &#8211; I have no clue why.</p>
<p>One solution would be if <a href="http://themeshaper.com/thematic-for-wordpress/">Thematic</a> had a hook before it called <a href="http://themeshaper.com/blog/custom-wordpress-hooks-filters-thematic-06/">thematic_postfooter()</a> which otherwise did nothing &#8211; but it doesn&#8217;t. </p>
<p>Another solution is if I could work out how to explicitly pass control to the <a href="http://themeshaper.com/blog/custom-wordpress-hooks-filters-thematic-06/">thematic_postfooter()</a> function at the end of my function.</p>
<p>I tried using <a href="http://extralogical.net/2007/06/wphooks/">the information about priorities</a> giving my function a priority of 5, but this didn&#8217;t work at all, it still replaced the thematic footer. It seems that sometimes adding an action over-rides, and sometimes it just adds (as expected).</p>
<p>It&#8217;s rather a mystery to me right now. It&#8217;s something that I think *should* be possible, but I cannot work out how. I&#8217;ve left <a href="http://themeshaper.com/forums/topic/thematic_postfooter">this message</a> on the thematic forums.</p>
<p>I would really appreciate a pointer here, if anyone has a bright idea. The latest <a href="http://code.google.com/p/murkymatic/source/browse/#svn/trunk">murkymatic code</a> can be found on <a href="http://code.google.com">google code</a>.</p>
<hr />
<p><small><a href="http://www.murky.org/blg/2009/01/thematic-a-problem-with-php/">Link - (Come and Comment - I like comments!)</a> | Original : <a href="http://www.murky.org/blg/2009/01/thematic-a-problem-with-php/">Thematic &#8211; A problem with php</a> |
© <a href="http://www.murky.org/blg">Murky</a>, 2009. |
Add to
<a href="http://del.icio.us/post?url=http://www.murky.org/blg/2009/01/thematic-a-problem-with-php/&title=Thematic &#8211; A problem with php">del.icio.us</a>
<br/>
Post tags: <a href="http://www.murky.org/blg/tag/child-theme/" rel="tag">Child Theme</a>, <a href="http://www.murky.org/blg/tag/code/" rel="tag">code</a>, <a href="http://www.murky.org/blg/tag/coding/" rel="tag">coding</a>, <a href="http://www.murky.org/blg/tag/html/" rel="tag">HTML</a>, <a href="http://www.murky.org/blg/tag/murkymatic/" rel="tag">Murkymatic</a>, <a href="http://www.murky.org/blg/tag/php/" rel="tag">php</a>, <a href="http://www.murky.org/blg/tag/thematic/" rel="tag">thematic</a>, <a href="http://www.murky.org/blg/tag/wordpress/" rel="tag">Wordpress</a><br/>
</small></p>
	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.murky.org/blg/murkymatic/" title="Murkymatic (January 1, 2009)">Murkymatic</a> (1)</li>
	<li><a href="http://www.murky.org/blg/2009/02/thematic-child-theme-post-footer-modification/" title="Thematic Child Theme &#8211; Post Footer Modification (February 15, 2009)">Thematic Child Theme &#8211; Post Footer Modification</a> (2)</li>
	<li><a href="http://www.murky.org/blg/2009/01/thematic-functionsphp-problem-solved/" title="Thematic &#8211; functions.php problem solved (January 2, 2009)">Thematic &#8211; functions.php problem solved</a> (0)</li>
	<li><a href="http://www.murky.org/blg/2009/01/thematic-functionsphp-problem/" title="Thematic &#8211; functions.php problem (January 1, 2009)">Thematic &#8211; functions.php problem</a> (2)</li>
	<li><a href="http://www.murky.org/blg/2008/12/wordpress-theme-style-declarations/" title="WordPress Theme Style Declarations (December 22, 2008)">WordPress Theme Style Declarations</a> (1)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.murky.org/blg/2009/01/thematic-a-problem-with-php/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>How I styled the Admin Dashboard</title>
		<link>http://www.murky.org/blg/2009/01/how-i-styled-the-admin-dashboard/</link>
		<comments>http://www.murky.org/blg/2009/01/how-i-styled-the-admin-dashboard/#comments</comments>
		<pubDate>Sun, 04 Jan 2009 10:18:32 +0000</pubDate>
		<dc:creator>Murk</dc:creator>
				<category><![CDATA[Geeky]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[dashboard]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[style]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://www.murky.org/blg/?p=4103</guid>
		<description><![CDATA[In which I mess around with php and css in order to hack the wordpress dashboard.]]></description>
			<content:encoded><![CDATA[<p>I wanted to style my WordPress dashboard, purely to see if I could.</p>
<p>It wasn&#8217;t too difficult, and this is how I did it.</p>
<p>In my theme, I found the functions.php file (creating it if it did not exist) and added an &#8216;action&#8217; which would come into play when the admin-head() hook was called. In WordPress, there are &#8216;hooks&#8217; at various points in the code. These are places which can be used to insert special functions. One such hook is admin-head() which is called in the header section of an admin page.</p>
<p>The file functions.php is where the user can put their php functions. It is wise to be sure you can edit the file (or in extremis delete) theme files without relying on the WordPress interface, as you can cause an error in editing these files which deny you access. If you can use ssh or ftp to see these files, you should be fine. Before you do anything, make a backup. You do this at your own risk, etc. etc. </p>
<p>Into functions.php, between &lt;?php and ?&gt; I inserted a piece of code which would insert into admin pages a link to a stylesheet:</p>
<blockquote><p><code>// custom admin theme<br />
function childtheme_admin() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo '&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;' . get_bloginfo('stylesheet_directory') . '/adminstyling.css&quot; /&gt;';<br />
}</code></p></blockquote>
<p>Be careful about the single and double quotes in there!</p>
<p>The next step is to create a file called &#8216;adminstyling.css&#8217;. This should be in the theme directory.</p>
<p>My admin stylesheet is very simple &#8211; and I would love to see some more complex examples.</p>
<blockquote><p><code>/* Styling the Admin pages */</code></p>
<p><code>#wpwrap {background-image: url(images/backgroundimage.png); position: top left; background-repeat: no-repeat; background-color: #fff; background-attachment: fixed;}</code></p></blockquote>
<p>You will also need to place a background image in a subdirectory of your theme, called images.</p>
<p>The final step is to go back to functions.php and tie the function just created to the &#8216;hook&#8217; which tells the function when to operate. At the bottom of functions.php add the following:</p>
<blockquote><p><code>add_action('admin_head', 'childtheme_admin');</code></p></blockquote>
<p>This should go before the final ?&gt; and after the function you just added (usually the add_action statements are the last thing in the file).</p>
<p>If all is well, saving the files and refreshing the admin screen will do several things:</p>
<ol>
<li>Call your function which&#8230;.</li>
<li>Inserts a reference to the stylesheet (if needed, check by viewing source of HTML in your browser), which&#8230;.</li>
<li>Loads the stylesheet (if needed, check the reference is correct by copying the reference from the HTML into the browser bar and seeing that you do indeed load the right file), which &#8230;.</li>
<li>Styles your dashboard pages</li>
</ol>
<div id="attachment_4104" class="wp-caption aligncenter" style="width: 310px"><img src="http://www.murky.org/blg/wp-content/uploads/2009/01/dashboardstyle.png" alt="This is my dashboard following the above modifications" title="Dash Board Style" width="300" height="205" class="size-full wp-image-4104" /><p class="wp-caption-text">This is my dashboard following the above modifications</p></div>
<p>If you try this, I&#8217;d be pleased to see a screenshot along with any nice bits of css you used. Do refer me to the appropriate post on your website!</p>
<hr />
<p><small><a href="http://www.murky.org/blg/2009/01/how-i-styled-the-admin-dashboard/">Link - (Come and Comment - I like comments!)</a> | Original : <a href="http://www.murky.org/blg/2009/01/how-i-styled-the-admin-dashboard/">How I styled the Admin Dashboard</a> |
© <a href="http://www.murky.org/blg">Murky</a>, 2009. |
Add to
<a href="http://del.icio.us/post?url=http://www.murky.org/blg/2009/01/how-i-styled-the-admin-dashboard/&title=How I styled the Admin Dashboard">del.icio.us</a>
<br/>
Post tags: <a href="http://www.murky.org/blg/tag/css/" rel="tag">css</a>, <a href="http://www.murky.org/blg/tag/dashboard/" rel="tag">dashboard</a>, <a href="http://www.murky.org/blg/tag/functionsphp/" rel="tag">functions.php</a>, <a href="http://www.murky.org/blg/tag/php/" rel="tag">php</a>, <a href="http://www.murky.org/blg/tag/style/" rel="tag">style</a>, <a href="http://www.murky.org/blg/tag/theme/" rel="tag">theme</a>, <a href="http://www.murky.org/blg/tag/wordpress/" rel="tag">Wordpress</a><br/>
</small></p>
	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.murky.org/blg/murkymatic/" title="Murkymatic (January 1, 2009)">Murkymatic</a> (1)</li>
	<li><a href="http://www.murky.org/blg/2008/12/wordpress-theme-style-declarations/" title="WordPress Theme Style Declarations (December 22, 2008)">WordPress Theme Style Declarations</a> (1)</li>
	<li><a href="http://www.murky.org/blg/2010/02/updated-code-for-series-posts/" title="Updated Code for Series Posts (February 6, 2010)">Updated Code for Series Posts</a> (2)</li>
	<li><a href="http://www.murky.org/blg/2009/02/thematic-child-theme-post-footer-modification/" title="Thematic Child Theme &#8211; Post Footer Modification (February 15, 2009)">Thematic Child Theme &#8211; Post Footer Modification</a> (2)</li>
	<li><a href="http://www.murky.org/blg/2009/01/thematic-functionsphp-problem-solved/" title="Thematic &#8211; functions.php problem solved (January 2, 2009)">Thematic &#8211; functions.php problem solved</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.murky.org/blg/2009/01/how-i-styled-the-admin-dashboard/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Thematic &#8211; functions.php problem solved</title>
		<link>http://www.murky.org/blg/2009/01/thematic-functionsphp-problem-solved/</link>
		<comments>http://www.murky.org/blg/2009/01/thematic-functionsphp-problem-solved/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 11:59:24 +0000</pubDate>
		<dc:creator>Murk</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Geeky]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[thematic]]></category>
		<category><![CDATA[Themes]]></category>

		<guid isPermaLink="false">http://www.murky.org/blg/?p=4074</guid>
		<description><![CDATA[In which I show a solution to the problem of calling for a stylesheet only if it exists.]]></description>
			<content:encoded><![CDATA[<p>Thanks to a helpful email from <a href="http://themeshaper.com/">Ian Stewart</a>, I now have solved the problem <a href="http://www.murky.org/blg/thematic-functionsphp-problem/">whereby I wanted</a> my child theme, <a href="http://www.murky.org/blg/murkymatic/">murkymatic</a>, to check for the existence of a variant.css file. The issue was that I was not using the path to the directory, but was instead using the path for the web. I.e. the program needed a path that looked like <code>/home/public_html/wp-content/themes/....</code> etc, and I gave it <code>http://www.murky.org/wp-content/...</code> etc&#8230;</p>
<blockquote><p><code>function childtheme_variantcss() {<br />
    // Pre-2.6 compatibility<br />
    if ( !defined('WP_CONTENT_URL') )<br />
        define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content');<br />
    if ( !defined('WP_CONTENT_DIR') )<br />
        define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );</code></p>
<p><code>    // Guess the location<br />
    $variantcss_path = WP_CONTENT_DIR.'/themes/murkymatic/variant.css';<br />
    $variantcss_url = WP_CONTENT_URL.'/themes/murkymatic/variant.css';</code></p>
<p><code>    if (file_exists($variantcss_path)) { ?&gt;<br />
        &lt;!-- Custom CSS --&gt; &lt;link rel="stylesheet" type="text/css" href="&lt;?php bloginfo('wpurl'); ?&gt;/wp-content/themes/murkymatic/variant.css" /&gt;<br />
    &lt;?php } elseif (file_exists($variantcss_url)) { ?&gt; &lt;!-- Custom CSS --&gt;<br />
        &lt;link rel="stylesheet" type="text/css" href="&lt;?php bloginfo('wpurl'); ?&gt;/wp-content/themes/murkymatic/variant.css" /&gt;<br />
    &lt;?php } else { ?&gt; &lt;!-- Create the file variant.css in the murkymatic directory to customise things --&gt; &lt;?php }<br />
} </code></p>
<p><code>add_action('wp_head', 'childtheme_variantcss');</code></p></blockquote>
<p>This is placed in the <code>functions.php</code> file.</p>
<hr />
<p><small><a href="http://www.murky.org/blg/2009/01/thematic-functionsphp-problem-solved/">Link - (Come and Comment - I like comments!)</a> | Original : <a href="http://www.murky.org/blg/2009/01/thematic-functionsphp-problem-solved/">Thematic &#8211; functions.php problem solved</a> |
© <a href="http://www.murky.org/blg">Murky</a>, 2009. |
Add to
<a href="http://del.icio.us/post?url=http://www.murky.org/blg/2009/01/thematic-functionsphp-problem-solved/&title=Thematic &#8211; functions.php problem solved">del.icio.us</a>
<br/>
Post tags: <a href="http://www.murky.org/blg/tag/code/" rel="tag">code</a>, <a href="http://www.murky.org/blg/tag/coding/" rel="tag">coding</a>, <a href="http://www.murky.org/blg/tag/css/" rel="tag">css</a>, <a href="http://www.murky.org/blg/tag/framework/" rel="tag">framework</a>, <a href="http://www.murky.org/blg/tag/php/" rel="tag">php</a>, <a href="http://www.murky.org/blg/tag/thematic/" rel="tag">thematic</a>, <a href="http://www.murky.org/blg/tag/themes/" rel="tag">Themes</a>, <a href="http://www.murky.org/blg/tag/wordpress/" rel="tag">Wordpress</a><br/>
</small></p>
	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.murky.org/blg/2009/01/thematic-functionsphp-problem/" title="Thematic &#8211; functions.php problem (January 1, 2009)">Thematic &#8211; functions.php problem</a> (2)</li>
	<li><a href="http://www.murky.org/blg/2008/12/wordpress-theme-style-declarations/" title="WordPress Theme Style Declarations (December 22, 2008)">WordPress Theme Style Declarations</a> (1)</li>
	<li><a href="http://www.murky.org/blg/2009/01/thematic-a-problem-with-php/" title="Thematic &#8211; A problem with php (January 11, 2009)">Thematic &#8211; A problem with php</a> (6)</li>
	<li><a href="http://www.murky.org/blg/murkymatic/" title="Murkymatic (January 1, 2009)">Murkymatic</a> (1)</li>
	<li><a href="http://www.murky.org/blg/2010/02/updated-code-for-series-posts/" title="Updated Code for Series Posts (February 6, 2010)">Updated Code for Series Posts</a> (2)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.murky.org/blg/2009/01/thematic-functionsphp-problem-solved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
