<?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>richl.com &#187; Wordpress</title>
	<atom:link href="http://richl.com/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://richl.com</link>
	<description>computing, wifi, drumming, gaming, ranting...a non-profit blog.</description>
	<lastBuildDate>Tue, 16 Mar 2010 20:25:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Offsetting posts with the Arras theme</title>
		<link>http://richl.com/2009/09/10/offsetting-posts-with-the-arras-theme/</link>
		<comments>http://richl.com/2009/09/10/offsetting-posts-with-the-arras-theme/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 21:45:49 +0000</pubDate>
		<dc:creator>Rich</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://richl.com/?p=259</guid>
		<description><![CDATA[The Arras theme for WordPress is fantastic, i have only been using it for a day and am very impressed. One common thing i found people needing is the ability to offset posts so they can add as many as they want and have them...


Related posts:<ol><li><a href='http://richl.com/2008/09/16/more-from-this-category-using-wordpress/' rel='bookmark' title='Permanent Link: More from this category using WordPress'>More from this category using WordPress</a></li>
<li><a href='http://richl.com/2008/02/22/looking-for-the-glossyblack-theme/' rel='bookmark' title='Permanent Link: Looking for the GlossyBlack theme?'>Looking for the GlossyBlack theme?</a></li>
<li><a href='http://richl.com/2008/07/08/add-thumbnail-path-to-wp25-uploader/' rel='bookmark' title='Permanent Link: Thumbnail path for WordPress 2.6'>Thumbnail path for WordPress 2.6</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>The Arras theme for WordPress is fantastic, i have only been using it for a day and am very impressed. One common thing i found people needing is the ability to offset posts so they can add as many as they want and have them display properly (not more than once) in the &#8220;Featured Articles&#8221; and &#8220;More News&#8221; sections. I have had a tweak around, and here is the easiest way i have found to do it:</p>
<p>Open up &#8220;home.php&#8221; in the root of the themes folder.</p>
<p>Find the following line:<br />
<code>elseif ($featured2_cat == '0') 	$query2 = 'showposts=' . arras_get_option('featured2_count')</code></p>
<p>And change it to:<br />
<code>elseif ($featured2_cat == '0') 	$query2 = 'showposts=' . arras_get_option('featured2_count') . '&#038;offset=4';</code></p>
<p>This will offset the &#8220;Featured Articles #2&#8243; section by 4 posts. For me this is perfect because i have four posts in the first &#8220;Featured Articles&#8221; section.</p>
<p>To then do the &#8220;Older News&#8221; (or whatever it is called) section, find the following line:</p>
<p><code>	'showposts' => ( (arras_get_option('index_count') == 0 ? get_option('posts_per_page') : arras_get_option('index_count')) )<br />
);</code></p>
<p>And change it to:</p>
<p><code>	'showposts' => ( (arras_get_option('index_count') == 0 ? get_option('posts_per_page') : arras_get_option('index_count')) )<br />
)  . '&#038;offset=13';</code></p>
<p>This will offset the news by 13 posts, because i have 4 &#8220;Featured Articles #1&#8243; and 9 &#8220;Featured Articles #2&#8243; which means in total i need to skip 13 posts.</p>
<p>Hope this helps people!</p>


<p>Related posts:<ol><li><a href='http://richl.com/2008/09/16/more-from-this-category-using-wordpress/' rel='bookmark' title='Permanent Link: More from this category using WordPress'>More from this category using WordPress</a></li>
<li><a href='http://richl.com/2008/02/22/looking-for-the-glossyblack-theme/' rel='bookmark' title='Permanent Link: Looking for the GlossyBlack theme?'>Looking for the GlossyBlack theme?</a></li>
<li><a href='http://richl.com/2008/07/08/add-thumbnail-path-to-wp25-uploader/' rel='bookmark' title='Permanent Link: Thumbnail path for WordPress 2.6'>Thumbnail path for WordPress 2.6</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://richl.com/2009/09/10/offsetting-posts-with-the-arras-theme/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>More from this category using WordPress</title>
		<link>http://richl.com/2008/09/16/more-from-this-category-using-wordpress/</link>
		<comments>http://richl.com/2008/09/16/more-from-this-category-using-wordpress/#comments</comments>
		<pubDate>Tue, 16 Sep 2008 06:43:27 +0000</pubDate>
		<dc:creator>Rich</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://richl.com/?p=229</guid>
		<description><![CDATA[Keeping readers to your website entertained can be a tricky thing to do, i certainly haven&#8217;t got enough interesting content to keep a reader looking around and re-visiting to check on what&#8217;s new. That aside, i use &#8221;More from this category&#8221; and &#8220;Recent Related Articles&#8221; blocks...


Related posts:<ol><li><a href='http://richl.com/2009/09/10/offsetting-posts-with-the-arras-theme/' rel='bookmark' title='Permanent Link: Offsetting posts with the Arras theme'>Offsetting posts with the Arras theme</a></li>
<li><a href='http://richl.com/2008/07/08/add-thumbnail-path-to-wp25-uploader/' rel='bookmark' title='Permanent Link: Thumbnail path for WordPress 2.6'>Thumbnail path for WordPress 2.6</a></li>
<li><a href='http://richl.com/2007/10/07/wordpress-is-awesome/' rel='bookmark' title='Permanent Link: WordPress is awesome!'>WordPress is awesome!</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Keeping readers to your website entertained can be a tricky thing to do, i certainly haven&#8217;t got enough interesting content to keep a reader looking around and re-visiting to check on what&#8217;s new. That aside, i use &#8221;More from this category&#8221; and &#8220;Recent Related Articles&#8221; blocks of code on as many pages of my site as i can as if somebody come&#8217;s across my site looking for &#8220;How to add the thumbnail path to the WordPress Media Uploader&#8221; i know they may also be interested in &#8220;How to do something kinda cool with WordPress that makes you more awesome&#8221;.</p>
<p>Below is the code i use for the &#8220;More from this category&#8221; on the right hand side, if you would like to use it simply add it at any point you wish within your sidebar.php file that resides in your themes directory (e.g. /themes/mythemename/comments.php).</p>
<blockquote><p>&lt;?php<br />
if ( is_single() ) :<br />
global $post;<br />
$categories = get_the_category();<br />
foreach ($categories as $category) :<br />
?&gt;<br />
&lt;li&gt;&lt;h2&gt;More from this category&lt;/h2&gt;<br />
&lt;ul class=&#8221;bullets&#8221;&gt;<br />
&lt;?php<br />
$posts = get_posts(&#8216;numberposts=10&amp;category=&#8217;. $category-&gt;term_id);<br />
foreach($posts as $post) :<br />
?&gt;<br />
&lt;li&gt;&lt;a href=&#8221;&lt;?php the_permalink(); ?&gt;&#8221;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/li&gt;</p>
<p>&lt;?php endforeach; ?&gt;</p>
<p>&lt;li&gt;&lt;strong&gt;&lt;a href=&#8221;&lt;?php echo get_category_link($category-&gt;term_id);?&gt;&#8221; title=&#8221;View all posts filed under &lt;?php echo $category-&gt;name; ?&gt;&#8221;&gt;Archive for &#8216;&lt;?php echo $category-&gt;name; ?&gt;&#8217; &amp;raquo;&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;/li&gt;<br />
&lt;?php endforeach; endif ; ?&gt;</p></blockquote>
<p><strong>A quick explanation</strong><br />
Starting at the beginning, this piece of code will initially check to see whether it is running on a &#8220;single&#8221; page, meaning it checks to see if it is on an article/blog page (not the front page, or a static page). It then get&#8217;s the category of the current page and requests 10 more of the most recent posts from the same category (numberposts=10, this can be changed to whatever you like). After that it uses a loop to display each link, and after all that it will display a link to the &#8220;Archive&#8221; for that category just in case the displayed articles aren&#8217;t interesting enough.</p>
<p><strong>CSS</strong><br />
As can be seen, the code uses the class &#8220;bullets&#8221; for styling, here is the CSS i use which you could copy into your style.css file and modify to suit your theme. If you already have a &#8220;bullets&#8221; class you can of course rename the class in the PHP code above to something else.</p>
<blockquote><p>.bullets li {<br />
background: url(images/sidebar-bullet.gif) no-repeat !important;<br />
padding-left: 16px !important;<br />
}</p></blockquote>
<p>If anyone would like to know how to do this using Images (like in my &#8220;Recent Related Articles&#8221; section on every page, then drop me a comment and ask me to post the code. I would be more than happy to do it, but am just not sure if anyone actually needs it.</p>


<p>Related posts:<ol><li><a href='http://richl.com/2009/09/10/offsetting-posts-with-the-arras-theme/' rel='bookmark' title='Permanent Link: Offsetting posts with the Arras theme'>Offsetting posts with the Arras theme</a></li>
<li><a href='http://richl.com/2008/07/08/add-thumbnail-path-to-wp25-uploader/' rel='bookmark' title='Permanent Link: Thumbnail path for WordPress 2.6'>Thumbnail path for WordPress 2.6</a></li>
<li><a href='http://richl.com/2007/10/07/wordpress-is-awesome/' rel='bookmark' title='Permanent Link: WordPress is awesome!'>WordPress is awesome!</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://richl.com/2008/09/16/more-from-this-category-using-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thumbnail path for WordPress 2.6</title>
		<link>http://richl.com/2008/07/08/add-thumbnail-path-to-wp25-uploader/</link>
		<comments>http://richl.com/2008/07/08/add-thumbnail-path-to-wp25-uploader/#comments</comments>
		<pubDate>Tue, 08 Jul 2008 10:10:17 +0000</pubDate>
		<dc:creator>Rich</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://richl.com/?p=137</guid>
		<description><![CDATA[Like many other WordPress theme&#8217;s, mine uses the wonder that is custom fields. It uses it for all those lovely images you see on the front page and in various other positions across the site. The only problem is, actually populating and using those custom...


Related posts:<ol><li><a href='http://richl.com/2008/09/16/more-from-this-category-using-wordpress/' rel='bookmark' title='Permanent Link: More from this category using WordPress'>More from this category using WordPress</a></li>
<li><a href='http://richl.com/2009/09/10/offsetting-posts-with-the-arras-theme/' rel='bookmark' title='Permanent Link: Offsetting posts with the Arras theme'>Offsetting posts with the Arras theme</a></li>
<li><a href='http://richl.com/2007/10/07/wordpress-is-awesome/' rel='bookmark' title='Permanent Link: WordPress is awesome!'>WordPress is awesome!</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Like many other WordPress theme&#8217;s, mine uses the wonder that is custom fields. It uses it for all those lovely images you see on the front page and in various other positions across the site. <img class="alignright size-full wp-image-139" title="wp25thumbhack" src="http://richl.com/wp-content/uploads/2008/07/wp25thumbhack.jpg" alt="" width="332" height="204" />The only problem is, actually populating and using those custom field&#8217;s can be hassle, especially for user&#8217;s that im trying to get started on posting&#8230;the first thing i do is baffle them with how to get the path for an image so they can paste it into a custom field.</p>
<p>So, i asked and searched around and nobody seemed to have an answer for me. I then proceeded to start hacking away and have now managed to add a &#8220;Thumb URL&#8221; inside the upload tool which can be used for copying/pasting into the custom field of your choice.</p>
<p>An example can be seen on the right.</p>
<p><strong></strong></p>
<p><strong>Want to implement this for yourself?<br />
</strong>It&#8217;s really pretty simple once you know where to look, but to be on the safe side make a backup copy of the media.php file before you start editing it so you can always revert back should something go horribly wrong.</p>
<ol>
<li>Find and open /wp-admin/includes/media.php</li>
<li>Find the following area of code:</li>
<div></div>
<p><span style="font-size: x-small;"></p>
<blockquote><p>&lt;thead class=&#8217;media-item-info&#8217;&gt;</p>
<p>&lt;td class=&#8217;A1B1&#8242; rowspan=&#8217;4&#8242;&gt;&lt;img class=&#8217;thumbnail&#8217; src=&#8217;$thumb_url&#8217; alt=&#8217;Thumbnail&#8217; /&gt;&lt;/td&gt;</p>
<p>&lt;td&gt;$filename&lt;/td&gt;</p>
<p>&lt;/tr&gt;</p>
<p>&lt;tr&gt;&lt;td&gt;$post-&gt;post_mime_type&lt;/td&gt;&lt;/tr&gt;</p>
<p>&lt;tr&gt;&lt;td&gt;&#8221; . mysql2date($post-&gt;post_date, get_option(&#8216;time_format&#8217;)) . &#8220;&lt;/td&gt;&lt;/tr&gt;</p>
<p>&lt;tr&gt;&lt;td&gt;&#8221; . apply_filters(&#8216;media_meta&#8217;, &#8221;, $post) . &#8220;&lt;/td&gt;&lt;/tr&gt;</p>
<p>&lt;/thead&gt;</p>
<p>&lt;tbody&gt;\n&#8221;;</p></blockquote>
<p> </p>
<p></span></p>
<li>Add the following line above &lt;/thead&gt;:</li>
<div></div>
<p><span style="font-size: x-small;"></p>
<blockquote><p>&lt;tr&gt;&lt;td colspan=2&gt;&lt;br /&gt;&lt;label&gt;Thumb URL: &lt;/label&gt; ;  &lt;input type=&#8217;text&#8217; name=&#8217;thumburl[$post-/&gt;ID][url]&#8216; value=&#8217;&#8221; . $thumb_url . &#8220;&#8216; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;</p></blockquote>
<p> </p>
<p></span></p>
<li>Save the file, your code should now look like this:</li>
<blockquote>
<div><span style="font-size: x-small;">&lt;thead class=&#8217;media-item-info&#8217;&gt;</span></div>
<div><span style="font-size: x-small;">&lt;tr&gt;</span></div>
<div><span style="font-size: x-small;">&lt;td class=&#8217;A1B1&#8242; rowspan=&#8217;4&#8242;&gt;&lt;img class=&#8217;thumbnail&#8217; src=&#8217;$thumb_url&#8217; alt=&#8217;Thumbnail&#8217; /&gt;&lt;/td&gt;</span></div>
<div><span style="font-size: x-small;">&lt;td&gt;$filename&lt;/td&gt;</span></div>
<div><span style="font-size: x-small;">&lt;/tr&gt;</span></div>
<div><span style="font-size: x-small;">&lt;tr&gt;&lt;td&gt;$post-&gt;post_mime_type&lt;/td&gt;&lt;/tr&gt;</span></div>
<div><span style="font-size: x-small;">&lt;tr&gt;&lt;td&gt;&#8221; . mysql2date($post-&gt;post_date, get_option(&#8216;time_format&#8217;)) . &#8220;&lt;/td&gt;&lt;/tr&gt;</span></div>
<div><span style="font-size: x-small;">&lt;tr&gt;&lt;td&gt;&#8221; . apply_filters(&#8216;media_meta&#8217;, &#8221;, $post) . &#8220;&lt;/td&gt;&lt;/tr&gt;</span></div>
<div><span style="font-size: x-small;">&lt;tr&gt;&lt;td colspan=2&gt;&lt;br /&gt;&lt;label&gt;Thumb URL:&lt;/label&gt;   &lt;input type=&#8217;text&#8217; name=&#8217;thumburl[$post-&gt;ID][url]&#8216; value=&#8217;&#8221; . $thumb_url . &#8220;&#8216; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;</span></div>
<div><span style="font-size: x-small;">&lt;/thead&gt;<br />
</span><span style="font-size: x-small;">&lt;tbody&gt;\n&#8221;;</span><span style="font-size: x-small;"> </p>
<p></span></div>
</blockquote>
</ol>
<p>That&#8217;s it, you&#8217;re done! If you have any suggestions or questions/comments, please feel free to leave them below.</p>


<p>Related posts:<ol><li><a href='http://richl.com/2008/09/16/more-from-this-category-using-wordpress/' rel='bookmark' title='Permanent Link: More from this category using WordPress'>More from this category using WordPress</a></li>
<li><a href='http://richl.com/2009/09/10/offsetting-posts-with-the-arras-theme/' rel='bookmark' title='Permanent Link: Offsetting posts with the Arras theme'>Offsetting posts with the Arras theme</a></li>
<li><a href='http://richl.com/2007/10/07/wordpress-is-awesome/' rel='bookmark' title='Permanent Link: WordPress is awesome!'>WordPress is awesome!</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://richl.com/2008/07/08/add-thumbnail-path-to-wp25-uploader/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
