<?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>SofaRider &#187; Feeleep</title>
	<atom:link href="http://rider.sofarider.com/author/admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://rider.sofarider.com</link>
	<description>WordPress Themes, Widgets, Development &#124; WEB &#38; Graphic Design</description>
	<lastBuildDate>Wed, 14 Oct 2009 08:40:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Sofa BizMate &#8211; new WordPress Theme</title>
		<link>http://rider.sofarider.com/work/wordpress-themes/sofa-bizmate-new-wordpress-theme/</link>
		<comments>http://rider.sofarider.com/work/wordpress-themes/sofa-bizmate-new-wordpress-theme/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 06:58:42 +0000</pubDate>
		<dc:creator>Feeleep</dc:creator>
				<category><![CDATA[WordPress Themes]]></category>

		<guid isPermaLink="false">http://rider.sofarider.com/?p=315</guid>
		<description><![CDATA[NOTE: This theme can be purchased exclusively via Themeforest!
Sofa BizMate is multipurpose, easy to maintain and setup WordPress theme. Options page inegrated into Admin panel lets you take control over each and every element which can be seen on theme&#8217;s front-end. There&#8217;s actually no need for widgets hence the fact that integrated Plugger system lets [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://rider.sofarider.com/wp-content/uploads/2009/10/bizmate.jpg" rel="shadowbox[post-315];player=img;"><img src="http://rider.sofarider.com/wp-content/uploads/2009/10/bizmate.jpg" alt="bizmate" title="bizmate" width="588" height="535" class="alignnone size-full wp-image-316" /></a><strong>NOTE:</strong> This theme can be purchased exclusively via <a href="http://themeforest.net/item/sofa-bizmate-wp-theme/64073">Themeforest</a>!</p>
<p>Sofa BizMate is multipurpose, easy to maintain and setup WordPress theme. Options page inegrated into Admin panel lets you take control over each and every element which can be seen on theme&#8217;s front-end. There&#8217;s actually no need for widgets hence the fact that integrated Plugger system lets you control sidebar content as well as entire Home page.<br />
Yeah, Home page content is made of Plugger and Widget units and can easily be expanded to 2&#215;3, 3&#215;3, 4&#215;5, 5&#215;3, etc. grid. You can combine Pluggers and Widgets to make unique content! However, keep on mind that Pluggers have priority and thus any eventual Widget will be pushed next to the very last Plugger unit.<br />
With all these on mind and extremely powerful Options page you can generate completely new site within 30 minutes. There&#8217;s no limit, your own creativity is the key factor so feel like playing around with Lego blocks.<br />
There&#8217;s also a new system of handling image size included. Basically you can use different size image for category and Post details as well as for Page &#8211; straight from Sofa BizMate Options (Admin panel).<br />
Another interesting fact is the possibility to add Portfolio category &#8211; if required. Such category can use it&#8217;s own settings and sidebar so it&#8217;ll look different than other categories (like Blog or News).<br />
Anyway, take a look at the demo and don&#8217;t miss few screenshots so you get an idea how Options page does look like indeed.</p>
<p>For all of you willing to read manuals before (eventual) purchase, it can be downloaded here: <br />
http://sofarider.com/downloads/bizMate_manuals.pdf</p>
]]></content:encoded>
			<wfw:commentRss>http://rider.sofarider.com/work/wordpress-themes/sofa-bizmate-new-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to trim the_content()</title>
		<link>http://rider.sofarider.com/blog/wordpress-tips/how-to-trim-the_content/</link>
		<comments>http://rider.sofarider.com/blog/wordpress-tips/how-to-trim-the_content/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 09:12:21 +0000</pubDate>
		<dc:creator>Feeleep</dc:creator>
				<category><![CDATA[Wordpress Tips]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[get_the_content()]]></category>
		<category><![CDATA[the_content()]]></category>
		<category><![CDATA[trim HTML]]></category>

		<guid isPermaLink="false">http://rider.sofarider.com/?p=307</guid>
		<description><![CDATA[My latest work was a customization of Rooster theme for one of my clients who didn&#8217;t like the idea of using &#60;!&#8211;more&#8211;&#62; separator. He wanted to have a split content at certain number of words and the idea of using the_excerpt() didn&#8217;t work hence the fact that this function strips out all the HTML code. [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://rider.sofarider.com/wp-content/uploads/2009/09/hoof_trim-200x200.jpg" alt="Trim content" title="Trim content" width="200" height="200" class="alignnone size-thumbnail wp-image-308" />My latest work was a customization of <a href="http://rider.sofarider.com/work/wordpress-themes/rooster-power-blog-wordpress-theme/">Rooster theme</a> for one of my clients who didn&#8217;t like the idea of using &lt;!&#8211;more&#8211;&gt; separator. He wanted to have a split content at certain number of words and the idea of using <strong>the_excerpt()</strong> didn&#8217;t work hence the fact that this function strips out all the HTML code. So I was faced with the problem and major issue was how to trim HTML formatted text?<span id="more-307"></span> Why? Because HTML formatted text may contain tags which MUST BE CLOSED and in the same time HTML tags are counted as characters!<br />
As you guess, the task may look like this: </p>
<ul>
<li>Temporary remove all eventual HTML tags</li>
<li>Trim stripped content at desired words length</li>
<li>Get all HTML tags back on their initial positions</li>
<li>Watch for unclosed tags </li>
</ul>
<p>OK, I guess the task is quite clear. Now we gonna create a function, paste it at the bottom of &#8216;functions.php&#8217; so it can be (re)used whenever is needed. I didn&#8217;t want to bother with making widget or plugin coz it takes more time and does the same job. Maybe one day I will. Here is our function:</p>
<pre>
<code>
&lt;?php
function trim_the_content( $the_contents, $read_more_tag = ' READ MORE...', $perma_link_to = '', $all_words = 45 ) {
	// make the list of allowed tags
	$allowed_tags = array( 'a', 'abbr', 'b', 'blockquote', 'b', 'cite', 'code', 'div', 'em', 'fon', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'label', 'i', 'p', 'pre', 'span', 'strong', 'title', 'ul', 'ol', 'li', 'object', 'embed' );
	if( $the_contents != '' ) {
		// process allowed tags
		$allowed_tags = '&lt;' . implode( '&gt;&lt;', $allowed_tags ) . '&gt;';
		$the_contents = str_replace( ']]&gt;', ']]&amp;gt;', $the_contents );
		$the_contents = strip_tags( $the_contents, $allowed_tags );
		// exclude HTML from counting words
		if( $all_words &gt; count( preg_split( '/[\s]+/', strip_tags( $the_contents ), -1 ) ) ) return $the_contents;
		// count all
		$all_chunks = preg_split( '/([\s]+)/', $the_contents, -1, PREG_SPLIT_DELIM_CAPTURE );
		$the_contents = '';
		$count_words = 0;
		$enclosed_by_tag = false;
		foreach( $all_chunks as $chunk ) {
			// is tag opened?
			if( 0 &lt; preg_match( '/&lt;[^&gt;]*$/s', $chunk ) ) $enclosed_by_tag = true;
			elseif( 0 &lt; preg_match( '/&gt;[^&lt;]*$/s', $chunk ) ) $enclosed_by_tag = false;
			// get entire word
			if( !$enclosed_by_tag &amp;&amp; '' != trim( $chunk ) &amp;&amp; substr( $chunk, -1, 1 ) != '&gt;' ) $count_words ++;
			$the_contents .= $chunk;
			if( $count_words &gt;= $all_words &amp;&amp; !$enclosed_by_tag ) break;
		}
                // note the class named 'more-link'. style it on your own
		$the_contents = $the_contents . '&lt;a class=&quot;more-link&quot; href=&quot;' . $perma_link_to . '&quot;&gt;' . $read_more_tag . '&lt;/a&gt;';
		// native WordPress check for unclosed tags
		$the_contents = force_balance_tags( $the_contents );
	}
	return $the_contents;
}
?&gt;
</code>
</pre>
<h2>How to use this code with your own theme templates?</h2>
<p>That&#8217;s easy, the only thing you need to do is to call our function (pasted in functions.php, remember?) and pass required arguments or parameters. For example&#8230;instead of using either <strong>the_excerpt()</strong> or <strong>the_content()</strong> WP&#8217;s functions you would write something like this:</p>
<pre>
<code>
&lt;?php
	// find out your post permalink
	$perma_link = get_permalink( $post-&gt;ID );
	// save original post content to variable
	$content = get_the_content();
	// prevent tags strip | it's a bug in WordPress!
	$content = apply_filters( 'the_content', $content );
	$content = str_replace( ']]&gt;', ']]&amp;gt;', $content );
	// throw out trimmed: content to process, read more tag, post permalink, words length
	echo trim_the_content( $content, 'READ MORE...', $perma_link, 45 );
?&gt;
</code>
</pre>
<p>Hopefully you find this function useful so share it with others PLEASE! Thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://rider.sofarider.com/blog/wordpress-tips/how-to-trim-the_content/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Rooster &#8211; power blog WordPress theme</title>
		<link>http://rider.sofarider.com/work/wordpress-themes/rooster-power-blog-wordpress-theme/</link>
		<comments>http://rider.sofarider.com/work/wordpress-themes/rooster-power-blog-wordpress-theme/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 07:06:15 +0000</pubDate>
		<dc:creator>Feeleep</dc:creator>
				<category><![CDATA[WordPress Themes]]></category>

		<guid isPermaLink="false">http://rider.sofarider.com/?p=303</guid>
		<description><![CDATA[NOTE: This theme can be purchased exclusively via Themeforest!
Sofa Rooster is flat Blog theme but extremely robust one. It uses Plugger system for easy sidebar content management and is fully settable through  theme options page integrated into Admin panel. 
You can set it up in just a few minutes and start blogging. Almost everything [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://rider.sofarider.com/wp-content/uploads/2009/09/rooster.jpg" rel="shadowbox[post-303];player=img;"><img src="http://rider.sofarider.com/wp-content/uploads/2009/09/rooster.jpg" alt="rooster" title="rooster" width="588" height="556" class="alignnone size-full wp-image-304" /></a><strong>NOTE:</strong> This theme can be purchased exclusively via <a href="http://themeforest.net/item/sofa-rooster-wordpress-theme/57508">Themeforest</a>!</p>
<p>Sofa Rooster is flat Blog theme but extremely robust one. It uses Plugger system for easy sidebar content management and is fully settable through  theme options page integrated into Admin panel. <br />
You can set it up in just a few minutes and start blogging. Almost everything needed for a kick-start is already there; Flickr, Twitter, 125&#215;125px advertising slots, pagination, smart subnavigation system, breadcrumbs, widget-ready sidebars (x6), jQuery featured content slider and much more. PSD files included as well!</p>
<p><b>Key features</b></p>
<ul>
<li>jQuery featured content slider</li>
<li>Widget ready sidebar</li>
<li>Built-in Plugger system</li>
<li>Built-in Contact form</li>
<li>Built-in Pagination</li>
<li>Built-in Breadcrumbs</li>
<li>Built-in Post related document downloads</li>
<li>7 ready made Pluggers included</li>
<li>Smart sub-navigation system</li>
<li>Settable via theme Options</li>
<li>Layered PSD included</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://rider.sofarider.com/work/wordpress-themes/rooster-power-blog-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WP Classified &#8211; classified ads WordPress theme</title>
		<link>http://rider.sofarider.com/work/wordpress-themes/wp-classified-classified-ads-wordpress-theme/</link>
		<comments>http://rider.sofarider.com/work/wordpress-themes/wp-classified-classified-ads-wordpress-theme/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 06:59:15 +0000</pubDate>
		<dc:creator>Feeleep</dc:creator>
				<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[classified ad]]></category>
		<category><![CDATA[eordpress theme]]></category>
		<category><![CDATA[paid subscription]]></category>
		<category><![CDATA[paypal]]></category>
		<category><![CDATA[wp classified]]></category>

		<guid isPermaLink="false">http://rider.sofarider.com/?p=299</guid>
		<description><![CDATA[
NOTE: This theme can be purchased exclusively via Themeforest!
WPClassified is YellowPress&#8217; younger brother on steroids. It comes with many improvements like custom log-in screen, star rating for entries/posts, built-in Plugger system, etc.
It may run in 2 modes: Free and Paid &#8211; just like YellowPress.

Paid mode requires from user  to pay for posting desired content. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://rider.sofarider.com/wp-content/uploads/2009/09/WPclass.jpg" rel="shadowbox[post-299];player=img;"><img src="http://rider.sofarider.com/wp-content/uploads/2009/09/WPclass.jpg" alt="WPclassified" title="WPclassified" width="588" height="536" class="alignnone size-full wp-image-300" /></a><br />
<strong>NOTE:</strong> This theme can be purchased exclusively via <a href="http://themeforest.net/item/wpclassified/48950">Themeforest</a>!</p>
<p>WPClassified is YellowPress&#8217; younger brother on steroids. It comes with many improvements like custom log-in screen, star rating for entries/posts, built-in Plugger system, etc.<br />
It may run in 2 modes: <b>Free</b> and <b>Paid</b> &#8211; just like YellowPress.<br />
<br />
<b>Paid</b> mode requires from user  to pay for posting desired content. Payments are done via PayPal and the payment process is fully automatic. As an Admin you can decide how much would you like to charge and how long user&#8217;s Post will be active. Everything is done via theme&#8217;s options (WP Admin).<br />
If a certain Post is expired user have the option to renew it as well.<br />
<br />
<b>Free</b> mode does not require payment in order to make user&#8217;s Post published. However, in order to prevent spam and non-suitable content Admin may limit the number of free entries per user straight from theme&#8217;s options panel. In Free mode users are not allowed to renew the Post nor delete it before expiration date.<br />
<br />
In addition Admin may decide whether Posts become expired after certain period of time or &#8216;live&#8217; forever. Expired posts (both free and paid) become archived and remain visible only in Archives. However, Home page and Category page do not display/list expired posts.<br />
<br />
This theme partially uses Plugger system. It does enable users to easily extend sidebar content and include it via theme Options.<br />
<br />
<b>Summarized</b></p>
<ul>
<li>Frontend Post publish by registered users</li>
<li>Two modes functional: Paid and Free</li>
<li>Anytime switch between two modes</li>
<li>Built-in PayPal</li>
<li>Expired Post validation</li>
<li>Expired Post Renewal option (Paid mode)</li>
<li>Admin control over user entries</li>
<li>Ready to use Contact form</li>
<li>Built-in &#8216;Social bookmarking&#8217; for each post</li>
<li>Built-in pagination</li>
<li>Built-in Plugger system</li>
<li>Widget ready</li>
<li>Settable via Theme Options</li>
<li>Custom Login panel</li>
<li>Integrated Starbox-voting plugin</li>
<li>Editable site header in PSD</li>
<li>Well documented</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://rider.sofarider.com/work/wordpress-themes/wp-classified-classified-ads-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to fix get_the_content() stripped tags?</title>
		<link>http://rider.sofarider.com/blog/wordpress-tips/how-to-fix-get_the_content-stripped-tags/</link>
		<comments>http://rider.sofarider.com/blog/wordpress-tips/how-to-fix-get_the_content-stripped-tags/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 06:49:04 +0000</pubDate>
		<dc:creator>Feeleep</dc:creator>
				<category><![CDATA[Wordpress Tips]]></category>
		<category><![CDATA[get_the_content()]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[missing tags]]></category>
		<category><![CDATA[stripped tags]]></category>

		<guid isPermaLink="false">http://rider.sofarider.com/?p=293</guid>
		<description><![CDATA[This is the problem I came across recently and I am still not sure whether this is a kind of intentional bug or else because it just looks like so. OK, what exactly happens when you use WordPress get_the_content() function in order to &#8217;save&#8217; Post or Page content into variable? You can do a little [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://rider.sofarider.com/wp-content/uploads/2009/09/1201373442_anus-200x200.jpg" alt="1201373442_anus" title="1201373442_anus" width="200" height="200" class="alignnone size-thumbnail wp-image-294" />This is the problem I came across recently and I am still not sure whether this is a kind of intentional bug or else because it just looks like so. OK, what exactly happens when you use WordPress <strong>get_the_content()</strong> function in order to &#8217;save&#8217; Post or Page content into variable? You can do a little test. Somewhere in your Post details, after <strong>the_content()</strong> function try to add the following code &#8211; just to compare what&#8217;s happening on frontend:</p>
<pre>
<code>
&lt;?php
	the_content(); // this is your standard way to output Post or Page content
	// now the test
	$var_content = get_the_content();
	echo $var_content;
?&gt;
</code>
</pre>
<p>It looks like paragraphs and break rules (&lt;p&gt; and &lt;br /&gt;) are gone. Maybe some other tags too but I have noticed those two. I suppose not so many developers use <strong>get_the_content()</strong> function, however some of my themes (this one too) needs it in order to extract images or documents out of Post/Page content and still keep text formatted. We all know that <strong>the_excerpt()</strong> function will strip down each and every html tag so there&#8217;s no sense in using it, especially not in Post/Page details template.</p>
<h2>Solution</h2>
<p>It&#8217;s true there&#8217;s a solution at codex.wordpress.org but for those who have hard time to find it &#8211; here it is:</p>
<pre>
<code>
&lt;?php
	the_content(); // this is your standard way to output Post or Page content
	// now the test which works
	$var_content = get_the_content();
	$var_content = apply_filters( 'the_content', $var_content );
	$var_content = str_replace( ']]&gt;', ']]&gt;', $var_content );
	echo $var_content;
?&gt;
</code>
</pre>
<p>It should be OK now. Just wanted to pay your attention to this issue since WordPress developer team didn&#8217;t fix it until 2.8.4 &#8211; currently available for download. Maybe next time.</p>
]]></content:encoded>
			<wfw:commentRss>http://rider.sofarider.com/blog/wordpress-tips/how-to-fix-get_the_content-stripped-tags/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress &#8211; simple site map code</title>
		<link>http://rider.sofarider.com/blog/wordpress-tips/wordpress-simple-site-map-code/</link>
		<comments>http://rider.sofarider.com/blog/wordpress-tips/wordpress-simple-site-map-code/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 06:41:49 +0000</pubDate>
		<dc:creator>Feeleep</dc:creator>
				<category><![CDATA[Wordpress Tips]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[site map]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://rider.sofarider.com/?p=284</guid>
		<description><![CDATA[Recently I&#8217;ve been proposed to add a sitemap template page (read functionality) to one of my WordPress themes. I started to Google for it but none of available plugins or code snippets didn&#8217;t do well. What my client actually wanted to have was something similar to a tree system where folders would represent categories/sub-categories and [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://rider.sofarider.com/wp-content/uploads/2009/09/tree-200x200.png" alt="tree" title="tree" width="200" height="200" class="alignnone size-thumbnail wp-image-283" />Recently I&#8217;ve been proposed to add a sitemap template page (read functionality) to one of my WordPress themes. I started to Google for it but none of available plugins or code snippets didn&#8217;t do well. What my client actually wanted to have was something similar to a tree system where folders would represent categories/sub-categories and files would &#8216;become&#8217; Post titles. So, here&#8217;s the result of a really simple site map generator for any WordPress theme.<br />
I do not claim it&#8217;s perfect and I&#8217;m aware it needs certain improvements but I guess it&#8217;s quite good for that purpose.</p>
<h2>The code</h2>
<p>Please note that I have created new WordPress template file and save it as &#8217;sitemap.php&#8217; in theme&#8217;s root folder. For more info regarding custom WP template files and how to use them, please refer to <a href="http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates" target="_blank">this page</a>.<br />
Also, another important info is that this code will work only for Custom Permalink structure set to <strong>/%category%/%postname%/</strong>.</p>
<pre>
<code>
&lt;?php
    // easy job for pages...
    echo '&lt;ul&gt;';
    echo '&lt;li&gt;&lt;h1&gt;PAGES:&lt;/h1&gt;&lt;/li&gt;';
    echo '&lt;li&gt;&lt;ul&gt;';
    wp_list_pages( 'title_li=&amp;echo=1' );
    echo '&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;';

    // categories sitemap will be tough...get'em all
    $subcats = wp_list_categories( 'echo=0&amp;use_desc_for_title=0&amp;title_li=' );
    // anybody there?
    preg_match_all( '|&lt;a.*?href=[\'&quot;](.*?)[\'&quot;].*?&gt;|i', $subcats, $m );
	if( !$m[ 1 ] ) {
		// no categs, subcategs or whatsoever...
		echo &quot;There are no categories added to your WordPress site.&quot;;
	} else {
		$arr_categories = array();
		$arr_orig_urls  = array();
		foreach( $m[ 1 ] as $key =&gt; $value ) {
			// $value will keep the URL, extract category slug
			$arr_of_url = explode( '/', $value );
			array_pop( $arr_of_url ); // remove empty
			// push the last
			array_push( $arr_categories, $arr_of_url[ count( $arr_of_url ) - 1 ] );
			// get its URL
			array_push( $arr_orig_urls, $value );
		}
	}

	if( count( $arr_categories ) &gt; 0 ) {
		// now we have entire logical structure of all categories
		// let's try to get ID for each of these
		echo '&lt;ul&gt;';
		echo '&lt;li&gt;&lt;h1&gt;CATEGORIES:&lt;/h1&gt;&lt;/li&gt;';
		$i = 0;
		while( $i &lt; count( $arr_categories ) ) {
			// shortcut by WP built-in
			$idObj = get_category_by_slug( $arr_categories[ $i ] );
			$catid = $idObj-&gt;term_id;

			// check whether this is root category. If true, make an outset in list, otherwise leave inset.
			if( $idObj-&gt;category_parent &gt; 0 ) echo '&lt;li&gt;&lt;ul&gt;';

			// get category real name and link
			$cat_real_name = $wpdb-&gt;get_var( &quot;SELECT name FROM $wpdb-&gt;terms WHERE term_id=&quot; . $catid );
			echo '&lt;li&gt;&lt;h2&gt;&lt;a href=&quot;' . $arr_orig_urls[ $i ] . '&quot;&gt;' . $cat_real_name . '&lt;/a&gt;&lt;/h2&gt;&lt;/li&gt;';

			// generate list of posts
			echo '&lt;li&gt;&lt;ul&gt;';
			query_posts( 'cat=' . $catid  . '&amp;order=ASC' ); // change to DESC - if required
			while( have_posts() ) : the_post();
?&gt;

&lt;li&gt;&lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot; title=&quot;&lt;?php the_title(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/li&gt;
&lt;?php
			endwhile;
			echo '&lt;/ul&gt;&lt;/li&gt;';
			if( $idObj-&gt;category_parent &gt; 0 ) echo '&lt;/ul&gt;&lt;/li&gt;';
			$i ++;
		}
	echo '&lt;/ul&gt;';
	}
?&gt;
</code>
</pre>
<p>Hopefully you will find this code useful. Any comment/suggestion regarding improvement is welcome!</p>
]]></content:encoded>
			<wfw:commentRss>http://rider.sofarider.com/blog/wordpress-tips/wordpress-simple-site-map-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to connect WordPress and Flash &#8211; part #2</title>
		<link>http://rider.sofarider.com/blog/wordpress-tips/how-to-connect-wordpress-and-flash-part-2/</link>
		<comments>http://rider.sofarider.com/blog/wordpress-tips/how-to-connect-wordpress-and-flash-part-2/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 08:32:45 +0000</pubDate>
		<dc:creator>Feeleep</dc:creator>
				<category><![CDATA[Wordpress Tips]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[wordpress flash]]></category>

		<guid isPermaLink="false">http://rider.sofarider.com/?p=267</guid>
		<description><![CDATA[Finally, part 2 of this tutorial is here. Part 1 can be seen HERE. There you can find out how to prepare and format data for Flash and now we are about to do something with it. I&#8217;ve made a package of all required files for download so you can see what else will be [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-thumbnail wp-image-170" title="2connection-done-big" src="http://rider.sofarider.com/wp-content/uploads/2009/06/2connection-done-big-200x200.jpg" alt="2connection-done-big" width="200" height="200" />Finally, part 2 of this tutorial is here. Part 1 can be seen <a href="http://rider.sofarider.com/blog/wordpress-tips/how-to-connect-wordpress-and-flash-part-1/">HERE</a>. There you can find out how to prepare and format data for Flash and now we are about to do something with it. I&#8217;ve made a package of all required files for download so you can see what else will be used. Please <a href="http://rider.sofarider.com/wp-content/uploads/2009/07/WP_flash.zip">download ZIP</a>, unpack and open <strong>WP_flash.fla</strong>. Code is well commented and I am not about to explain how and why. This is just an example of my own implementation, you may develop your own and display data differently in Flash. My goal was to demonstrate WP &#8211; Flash data exchange on the simplest possible way.</p>
<h2>How to use it?</h2>
<p>Just for demo purpose upload all the files (and &#8217;script&#8217; folder as well!) to the root of your theme, it doesn&#8217;t matter which one. Now you need to call &#8216;WP_flash_holder.php&#8217; in Browser but full path to this file must be used because we are currently out of WP &#8216;native environment&#8217;:<br />
<strong>http://yourdomain.com/wp-content/themes/your_theme_name/WP_flash_holder.php</strong>.<br />
For a case you are about to include <strong>WP_flash.swf</strong> in any existing template file of your theme (for example <strong>sidebar.php</strong>), things will work normally.</p>
<p>NOTE:</p>
<p>Open <strong>WP_flash_holder.php</strong> and change path to match your domain and theme name otherwise it&#8217;ll not work. For example the line reading:</p>
<pre><code>
&lt;script src="http://your_domain.com/wp-content/themes/your_theme_name/script/swfobject.js" type="text/javascript"&gt;&lt;/script&gt;
</code></pre>
<p>As well as:</p>
<pre><code>
var so = new SWFObject( "http://your_domain.com/wp-content/themes/your_theme_name/WP_flash.swf", "wpflash", "550", "400", "8" );
</code></pre>
<p>&#8230;must be replaced with your own data!</p>
<h2>Files in package&#8230;</h2>
<ul>
<li> <strong>slidestyle.css<br />
</strong>Flash Player supports a subset of properties in the original CSS1 specification only so basic text formatting can be done here. Not much but enough for this tutorial.</li>
<li> <strong>WP_flash_holder.php </strong><br />
This file is here just to properly include/embed Flash file into HTML page. In source code you can read how to include Flash in native WordPress environment (for example <strong>sidebar.php</strong>).</li>
<li> <strong>script &gt; swfobject.js </strong><br />
As already mentioned, swf must be properly embed so this is nothing but a piece of javascript code required to avoid page errors and Browser warnings.</li>
<li> <strong>WP_flash.fla</strong> and <strong>WP_flash.swf</strong><br />
Source and rendered file used for demonstration purpose.</li>
</ul>
<h2>It&#8217;s good to know</h2>
<p>I guess some of you already plan to make a first Flash theme so it&#8217;s good to know that each and every WP theme must fulfill minimum requirements. Theme folder MUST contain the following files: <strong>index.php</strong>, <strong>style.css</strong> and <strong>functions.php</strong> (screenshot.png). In that case you can keep all of your Flash styles in <strong>style.css</strong> and embed Flash into <strong>index.php</strong>. Remember, it&#8217;s a long way to develop Flash theme and this tutorial is just a little tiny foot step on the long path up to the hill. Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://rider.sofarider.com/blog/wordpress-tips/how-to-connect-wordpress-and-flash-part-2/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>How to add teaser image next to post title</title>
		<link>http://rider.sofarider.com/blog/wordpress-tips/how-to-add-an-image-teaser-next-to-post-title/</link>
		<comments>http://rider.sofarider.com/blog/wordpress-tips/how-to-add-an-image-teaser-next-to-post-title/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 06:52:11 +0000</pubDate>
		<dc:creator>Feeleep</dc:creator>
				<category><![CDATA[Wordpress Tips]]></category>
		<category><![CDATA[extract image]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[teaser image]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[wordpress title image]]></category>

		<guid isPermaLink="false">http://rider.sofarider.com/?p=245</guid>
		<description><![CDATA[Recently I&#8217;ve received an email regarding those little thumbnails next to Post title. My mate asked me to explain how to set it up so here&#8217;s the &#8216;trick&#8217;. As you may note, teaser thumb in this Post will only be displayed once. There&#8217;s no duplicate within the content in spite of the fact that you [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://rider.sofarider.com/wp-content/uploads/2009/07/gorilla-200x200.jpg" alt="gorilla" title="gorilla" width="200" height="200" class="alignnone size-thumbnail wp-image-246" />Recently I&#8217;ve received an email regarding those little thumbnails next to Post title. My mate asked me to explain how to set it up so here&#8217;s the &#8216;trick&#8217;. As you may note, teaser thumb in this Post will only be displayed once. There&#8217;s no duplicate within the content in spite of the fact that you upload teaser image along with the rest of the content and all other images related to it. Yes, no Custom Fields involved here at all!</p>
<blockquote><p>Otherwise spoken, how to extract certain image out of the post and display it out of context.</p></blockquote>
<p>So how the hell WordPress can know which image is supposed to represent teaser image if there&#8217;s at least one image extra attached to the very same Post? Well, that&#8217;s the trick. <strong>We must use different &#8220;insert&#8221; method</strong>. Let&#8217;s assume all other images are clickable and users are able to see full size for each of them. In order to properly extract teaser image from Post later in frontend we&#8217;ll use the following method to insert it first:<br />
<a href="http://rider.sofarider.com/wp-content/uploads/2009/07/ill_post.png" rel="shadowbox[post-245];player=img;"><img src="http://rider.sofarider.com/wp-content/uploads/2009/07/ill_post.png" alt="ill_post" title="ill_post" width="588" height="343" class="alignnone size-full wp-image-248" /></a><br />
If you take a look at the HTML code after, you&#8217;ll note that this image is not enclosed with &lt;a&gt;&lt;/a&gt; tags, right? Let&#8217;s now take a look how to extract such image from the content&#8230;</p>
<h2>Extracting teaser image from Post</h2>
<p>The basic idea is to grab teaser thumbnail from the_content() and replace it with &#8211; nothing, empty string. Remember, we don&#8217;t want to have the same image displayed twice within Post.</p>
<pre>
<code>
&lt;?php
    // get the first image out of content, prevent double image display
    $path = &quot;&quot;; // teaser image path
    $content = get_the_content(); // get Post content entirely
    // grab fist image (teaser thumb) by pattern
    $frst_image = preg_match_all( '|&lt;img.*?src=[\'&quot;](.*?)[\'&quot;].*?&gt;|i', $content, $matches );
    // any image there?
    if( $frst_image &gt; 0 ) {
    	$path = $matches[ 1 ][ 0 ]; // we need the first one only!
    	// replace with empty string in order to avoid duplicates
    	$content = preg_replace( '|&lt;img.*?src=[\'&quot;](' . $path . ')[\'&quot;].*?&gt;|i', '', $content );
    }
    if( $path ) {
    	// teaser image found! display it now or leave in variable for later
?&gt;
    	&lt;img src=&quot;&lt;?php echo $path; ?&gt;&quot; alt=&quot;&lt;?php echo get_the_title(); ?&gt;&quot; class=&quot;thumbnail&quot; /&gt;
&lt;?php
    	$path = &quot;&quot;;
    } else {
    	// teaser image not found. replace with dummy graphic
?&gt;
    	&lt;img src=&quot;&lt;?php echo bloginfo( 'template_directory' ) . ( '/images/no_image.jpg' ); ?&gt;&quot; alt=&quot;&lt;?php echo get_the_title(); ?&gt;&quot; class=&quot;thumbnail&quot; /&gt;
&lt;?php
    	$path = &quot;&quot;;
    }
?&gt;
</code>
</pre>
<p>There&#8217;s one little tip at the end: Insert teaser images before any other Post content (text or other images). It&#8217;s good idea to keep things organized.</p>
]]></content:encoded>
			<wfw:commentRss>http://rider.sofarider.com/blog/wordpress-tips/how-to-add-an-image-teaser-next-to-post-title/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>How to build sequential navigation in WordPress</title>
		<link>http://rider.sofarider.com/blog/wordpress-tips/how-to-build-sequential-navigation-in-wordpress/</link>
		<comments>http://rider.sofarider.com/blog/wordpress-tips/how-to-build-sequential-navigation-in-wordpress/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 07:56:24 +0000</pubDate>
		<dc:creator>Feeleep</dc:creator>
				<category><![CDATA[Wordpress Tips]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[sequential]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wordpress navigation]]></category>

		<guid isPermaLink="false">http://rider.sofarider.com/?p=226</guid>
		<description><![CDATA[What is exactly &#8217;sequential navigation&#8217;? From the navigation point of view, imagine category which has &#8216;n&#8217; number of sub-categories and each of these sub-categories may have &#8216;n&#8217; number of sub-sub-categories&#8230;etc. From programmer&#8217;s point of view it&#8217;s a nested list whose list item may contain another nested list and so on. Personally, I&#8217;m not a fan [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://rider.sofarider.com/wp-content/uploads/2009/07/naef_animal_puzzle_LRG-200x200.jpg" alt="naef_animal_puzzle_LRG" title="naef_animal_puzzle_LRG" width="200" height="200" class="alignnone size-thumbnail wp-image-228" />What is exactly &#8217;sequential navigation&#8217;? From the navigation point of view, imagine category which has &#8216;n&#8217; number of sub-categories and each of these sub-categories may have &#8216;n&#8217; number of sub-sub-categories&#8230;etc. From programmer&#8217;s point of view it&#8217;s a nested list whose list item may contain another nested list and so on. Personally, I&#8217;m not a fan of nested list, it makes the site ugly. Branched or multi-level drop-down menu is OK, however it keeps child categories/pages always hidden.</p>
<p>
And here it comes sequential navigation as quite handy solution. I like to use it in conjunction with <a href="http://rider.sofarider.com/blog/wordpress-tips/easy-breadcrumbs/">breadcrumbs</a> so there&#8217;s no chance site visitor gets &#8216;lost&#8217;. As you know, in WordPress categories and pages can have &#8216;children&#8217;, up to 999 levels &#8211; as I recall &#8211; please correct me if I am wrong. Of course, you&#8217;ll never need so many navigation levels but I&#8217;m sure 3 are quite often.
</p>
<p>
Before showing the code, I would like to explain the logic behind sequential navigation. Here&#8217;s an illustration &#8211; just to show you what we are up to.<br />
<a href="http://rider.sofarider.com/wp-content/uploads/2009/07/sequential_navig.png" rel="shadowbox[post-226];player=img;"><img src="http://rider.sofarider.com/wp-content/uploads/2009/07/sequential_navig.png" alt="sequential_navig" title="sequential_navig" width="598" height="329" class="alignnone size-full wp-image-227" /></a>
</p>
<blockquote><p>Our goal is to display only the first level children of selected category, no matter how &#8216;deep&#8217; we are.</p></blockquote>
<p>
Parent category (or page) will always be displayed as a title, indicating current menu set. Hopefully it does make sense to you. It doesn&#8217;t? Later you will be able to read how easily is to implement it into your own site&#8230;
</p>
<h2>The code</h2>
<p>Code is well commented so there shouldn&#8217;t be a problem to understand the logic&#8230;</p>
<pre>
<code>
&lt;?php
	// is there a page or category? both may have childeren
	if( is_category() ) {
		// if this category has childeren
		$categ_object = get_category( get_query_var( 'cat' ), false );
		$list_subcats = wp_list_categories( 'title_li=&amp;depth=1&amp;echo=0&amp;child_of=' . (int)$categ_object-&gt;cat_ID );
		// wordpress never returns null or empty string. If children, &lt;a&gt; tag will be found, otherwise string is returned.
		preg_match_all( '|&lt;a.*?href=[\'&quot;](.*?)[\'&quot;].*?&gt;|i', $list_subcats, $m );
		if( !$m[ 1 ] ) {
			// there are no subcategories. Why?
			// this is either the last child or this category really doesn't have subcategories
			// last child must have a parent, right?
				if( (int)$categ_object-&gt;category_parent &gt; 0 ) {
					// we'll need parent category name for the title, extract name via category ID
					$parent_cat_name = $wpdb-&gt;get_var( &quot;SELECT name FROM $wpdb-&gt;terms WHERE term_id=&quot; . (int)$categ_object-&gt;category_parent );
?&gt;
					&lt;div class=&quot;box&quot;&gt;
					&lt;h1&gt;&lt;?php echo $parent_cat_name; ?&gt;&lt;/h1&gt;
					&lt;ul class=&quot;subnavigation&quot;&gt;
					&lt;?php wp_list_categories( 'title_li=&amp;depth=1&amp;child_of=' . (int)$categ_object-&gt;category_parent ); ?&gt;
					&lt;/ul&gt;
					&lt;/div&gt;
&lt;?php
				} // else...no else! This category really doesn't have child categories.
		} else {
			// ohoho! ...but here are some. List them all...
?&gt;
			&lt;div class=&quot;box&quot;&gt;
			&lt;h1&gt;&lt;?php echo $categ_object-&gt;cat_name; ?&gt;&lt;/h1&gt;
			&lt;ul class=&quot;subnavigation&quot;&gt;
			&lt;?php wp_list_categories( 'title_li=&amp;depth=1&amp;child_of=' . (int)$categ_object-&gt;cat_ID ); ?&gt;
			&lt;/ul&gt;
			&lt;/div&gt;
&lt;?php
		}
	}
	// almost the same for page hierarchy.
	if( is_page() ) {
		// here we go...just do the same job
		$page_object = get_post( get_query_var( 'page' ), OBJECT );
		$list_subpages = wp_list_pages( 'title_li=&amp;depth=1&amp;echo=0&amp;child_of=' . (int)$page_object-&gt;ID );
		// wordpress never returns null or empty string. If children, &lt;a&gt; tag will be found, otherwise string is returned.
		preg_match_all( '|&lt;a.*?href=[\'&quot;](.*?)[\'&quot;].*?&gt;|i', $list_subpages, $ms );
		if( !$ms[ 1 ] ) {
			if( (int)$page_object-&gt;post_parent &gt; 0 ) {
				$parent_post_name = $wpdb-&gt;get_var( &quot;SELECT post_title FROM $wpdb-&gt;posts WHERE ID=&quot; . (int)$page_object-&gt;post_parent );
?&gt;
				&lt;div class=&quot;box&quot;&gt;
				&lt;h1&gt;&lt;?php echo $parent_post_name; ?&gt;&lt;/h1&gt;
				&lt;ul class=&quot;subnavigation&quot;&gt;
				&lt;?php wp_list_pages( 'title_li=&amp;depth=1&amp;child_of=' . (int)$page_object-&gt;post_parent ); ?&gt;
				&lt;/ul&gt;
				&lt;/div&gt;
&lt;?php
			}
		} else {
?&gt;
				&lt;div class=&quot;box&quot;&gt;
				&lt;h1&gt;&lt;?php echo $page_object-&gt;post_title; ?&gt;&lt;/h1&gt;
				&lt;ul class=&quot;subnavigation&quot;&gt;
				&lt;?php wp_list_pages( 'title_li=&amp;depth=1&amp;child_of=' . (int)$page_object-&gt;ID ); ?&gt;
				&lt;/ul&gt;
				&lt;/div&gt;
&lt;?php
		}
	}
?&gt;
</code>
</pre>
<p>
And this is it; save, and see how it works. You may want to replace style/class name for div in &#8216;navigation.php&#8217; but this should be an easy part.</p>
]]></content:encoded>
			<wfw:commentRss>http://rider.sofarider.com/blog/wordpress-tips/how-to-build-sequential-navigation-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WPClassified &#8211; public visual bookmarks</title>
		<link>http://rider.sofarider.com/blog/sites-to-check-for/wpclassified-public-visual-bookmarks/</link>
		<comments>http://rider.sofarider.com/blog/sites-to-check-for/wpclassified-public-visual-bookmarks/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 13:09:03 +0000</pubDate>
		<dc:creator>Feeleep</dc:creator>
				<category><![CDATA[Sites to check for]]></category>
		<category><![CDATA[bookmarks]]></category>
		<category><![CDATA[visual]]></category>
		<category><![CDATA[wordpress community]]></category>

		<guid isPermaLink="false">http://rider.sofarider.com/?p=221</guid>
		<description><![CDATA[I&#8217;ve been a while from this blog and here is why&#8230;Few minutes ago I have officially launched WPClassified.net &#8211; a brand new, public, visual bookmarking site related to ever-growing WordPress community. It runs on WordPress and uses my latest WP theme which will soon be available here at my site. I&#8217;ve spent almost 2 weeks [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://rider.sofarider.com/wp-content/uploads/2009/07/wpclassified.png" alt="wpclassified" title="wpclassified" width="200" height="200" class="alignnone size-full wp-image-222" />I&#8217;ve been a while from this blog and here is why&#8230;Few minutes ago I have officially launched <a href="http://wpclassified.net">WPClassified.net</a> &#8211; a brand new, public, visual bookmarking site related to ever-growing WordPress community. It runs on WordPress and uses my latest WP theme which will soon be available here at my site. I&#8217;ve spent almost 2 weeks to make it ready and hopefully it&#8217;ll serve community on the way it is supposed to. Right now it&#8217;s still in some sort of &#8216;beta&#8217; phase but I have big plans for later stage.<br />
<br />
Officially, this is an invitation for all the people who are willing to share their bookmarks and participate in building useful and informative WP community site. We all can benefit, isn&#8217;t, this site is quite well SEO optimized and prepared so it&#8217;s definitely worth to keep your bookmarks there. Thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://rider.sofarider.com/blog/sites-to-check-for/wpclassified-public-visual-bookmarks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
