<?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>Fahlstad Design &#187; WordPress Tricks</title>
	<atom:link href="http://fahlstad.se/category/wordpress-tricks/feed/" rel="self" type="application/rss+xml" />
	<link>http://fahlstad.se</link>
	<description>WordPress Unlimited</description>
	<lastBuildDate>Wed, 20 Jul 2011 22:11:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>WordPress tabbed sidebar panel part 1</title>
		<link>http://fahlstad.se/2008/11/wordpress-tabbed-sidebar-panel-part-1/</link>
		<comments>http://fahlstad.se/2008/11/wordpress-tabbed-sidebar-panel-part-1/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 08:03:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WordPress Tricks]]></category>
		<category><![CDATA[tips tricks]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.fahlstad.se/?p=851</guid>
		<description><![CDATA[You have probably seen the tabbed sidebar panels on various websites.These are great if your sidebar are getting too populated and you need to clean it up a bit. This tutorial will show you how to implement one using WordPress, jQuery and a jQuery plugin called jQuery.tabs. What to display in the tabs The first [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.fahlstad.se/wp-content/uploads/picture-23.png"><img class="alignleft size-thumbnail wp-image-853" title="picture-23" src="http://www.fahlstad.se/wp-content/uploads/picture-23-150x104.png" alt="" width="150" height="104" /></a>You have probably seen the tabbed sidebar panels on various websites.These are great if your sidebar are getting too populated and you need to clean it up a bit.</p>
<p>This tutorial will show you how to implement one using WordPress, jQuery and a jQuery plugin called jQuery.tabs.</p>
<h4>What to display in the tabs</h4>
<p>The first we need to determine what we want to display in the tabs, for this tutorial I will use three tabs displaying: latest posts, latest comments and Tags. You can display anything you want but for this tutorial these will do.</p>
<h4>Functions</h4>
<p>I have in my functions.php file for my template made these two simple functions for displaying the latest posts and comments. Go ahead and paste them into yours to make this turorial working.</p>
<p>What they do is simply get the latest posts and comments and displays them in an unordered list.</p>
<h4>Making a container</h4>
<p>We need a div container for our panel, we give this div the ID &#8220;container&#8221;. In your sidebar.php where you want the panel to be dislayed add the following code:</p>
<p>The tabs displayed at the very top of the panel in a simple unordered list which we attach some javascript events to via jQuery. For our purpose we add a list with our three tabs.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;div id=&quot;container&quot;&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;#latest_posts&quot;&gt;Latest Posts&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;#latest_comments&quot;&gt;Latest Comments&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;#tags&quot;&gt;Tags&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</pre>
<p>The links will be used to determine what to display when we click on one tab. Now we have the initial menu, we will now be adding the content to display. We will add them all just under the menu list. We will be adding divs to hold the content with the id of the links in the menu list.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;div id=&quot;container&quot;&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;#latest_posts&quot;&gt;Latest Posts&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;#latest_comments&quot;&gt;Latest Comments&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;#tags&quot;&gt;Tags&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</pre>
<p>I the next part we will take a look at the Javascript to make it happen.<br />
Hang in there.</p>
]]></content:encoded>
			<wfw:commentRss>http://fahlstad.se/2008/11/wordpress-tabbed-sidebar-panel-part-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Custom WordPress loop</title>
		<link>http://fahlstad.se/2008/10/custom-wordpress-loop/</link>
		<comments>http://fahlstad.se/2008/10/custom-wordpress-loop/#comments</comments>
		<pubDate>Sun, 19 Oct 2008 19:34:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WordPress Tricks]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.fahlstad.se/?p=741</guid>
		<description><![CDATA[One problem I have come a cross lots of times is that I need to customize the WordPress loop, in other words I&#8217;d like to display posts from certain categories on the front page instead of the default one who shows the most recent posts in a descending order. This is most convenient when you [...]]]></description>
			<content:encoded><![CDATA[<p>One problem I have come a cross lots of times is that I need to customize the WordPress loop, in other words I&#8217;d like to display posts from certain categories on the front page instead of the default one who shows the most recent posts in a descending order.</p>
<p>This is most convenient when you have a category where you post short links or snippets that you want to show in the sidebar or on the top of the page. Much like what the asides plugin do. But I like to do things my own way so I&#8217;m gonna show you how to do this in a very easy way.<span id="more-741"></span></p>
<h4>Create a category</h4>
<p>Let&#8217;s start by adding a category, I have for example the category &#8220;WordPress tricks&#8221; which this post is filed under. Here I post tutorials and tips for WordPress and I&#8217;m gonna display the heading with a link to the posts in the sidebar.</p>
<h4>Adding posts</h4>
<p>Go ahead and add some posts to your newly created category and make add the appropriate tags and if you want the posts to be filed under multiple categories thats no problem.</p>
<h4>The code</h4>
<p>To make the category heading appear in the sidebar we need to make a custom loop where we only want to retrieve and display the posts from our category. What you need to do is check what id your new category has, mine has the ID 17. You can check this on the categories page in WordPress admin. </p>
<p>Let&#8217;s start by getting the 5 most recent posts from the category with ID 17 in an ascending order. If you want a descending order substitute the &#8220;ASC&#8221; with DESC in the code below. Add this somewhere in your sidebar.php or on which ever template file you wish.</p>
<pre class="brush: php; title: ; notranslate">
 $posts = query_posts(&quot;cat=17&amp;showposts=5&amp;order=ASC&quot;);
</pre>
<p>So now the variable &#8220;posts&#8221; contain our posts with all the meta data and attributes associated with a post. Now all we have to loop through all the posts and display the heading with a link and perhaps the date.</p>
<h4>The loop</h4>
<p>Add this to where you want the posts to appear in your sidebar. Check the comments in the code for explanations.</p>
<p>Now we have a nice ordered list with the title of the post with a link with the date. On my test sidebar it looks like this:</p>
<p><a href="http://www.fahlstad.se/wp-content/uploads/picture-51.png"><img src="http://www.fahlstad.se/wp-content/uploads/picture-51.png" alt="" title="picture-51" width="230" height="244" class="alignnone size-full wp-image-758" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://fahlstad.se/2008/10/custom-wordpress-loop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

