<?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>msafi.com &#187; WordPress Sidebar</title>
	<atom:link href="http://msafi.com/tag/wordpress-sidebar/feed/" rel="self" type="application/rss+xml" />
	<link>http://msafi.com</link>
	<description>The friendly blog of MK Safi</description>
	<lastBuildDate>Wed, 28 Jul 2010 22:16:36 +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>Clean Your WordPress Sidebar to Improve Navigation and SEO!</title>
		<link>http://msafi.com/clean-your-wordpress-sidebar-to-improve-navigation-and-seo/</link>
		<comments>http://msafi.com/clean-your-wordpress-sidebar-to-improve-navigation-and-seo/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 18:01:23 +0000</pubDate>
		<dc:creator>MK</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Blog Structure]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Sidebar]]></category>

		<guid isPermaLink="false">http://msafi.com/?p=776</guid>
		<description><![CDATA[Most people just accept the default, out-of-box layout of blogs even though they know it is not optimal for the nature of their blog. I&#8217;m not the first to say that blog navigation is a nightmare. Why is that? The main problem with blog navigation is that the content is not interlinked properly. That&#8217;s especially [...]


Related posts:<ol><li><a href='http://msafi.com/fix-yet-another-related-posts-plugin-yarpp-widget-and-add-it-to-the-sidebar/' rel='bookmark' title='Permanent Link: Fix Yet Another Related Posts Plugin (YARPP) Widget and Add it to the Sidebar'>Fix Yet Another Related Posts Plugin (YARPP) Widget and Add it to the Sidebar</a></li>
<li><a href='http://msafi.com/how-to-make-posts-have-different-sidebar-from-the-rest-of-wordpress-blog/' rel='bookmark' title='Permanent Link: Give Posts Their Own Sidebar in WordPress'>Give Posts Their Own Sidebar in WordPress</a></li>
<li><a href='http://msafi.com/sensible-use-of-tags-in-a-wordpress-blog/' rel='bookmark' title='Permanent Link: Sensible Use of &#8220;Tags&#8221; in a WordPress Blog'>Sensible Use of &#8220;Tags&#8221; in a WordPress Blog</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-796 noborder" title="wordpress" src="http://msafi.com/home5/mohamme3/public_html/msaficom/wp-content/uploads/2010/01/wordpress.jpg" alt="" width="126" height="119" />Most people just accept the default, out-of-box layout of blogs even though they know it is not optimal for the nature of their blog. I&#8217;m not the first to say that blog navigation is a nightmare.</p>
<p>Why is that?</p>
<p>The main problem with blog navigation is that the content is not interlinked properly. That&#8217;s especially true for generic blogs that aren&#8217;t about one single topic.</p>
<p>When a visitor lands on your generic blog, they&#8217;re probably interested in only one of the topics that you cover. Say that topic is dogs. Even though all of your dog posts are grouped by &#8220;tags&#8221; and &#8220;categories&#8221;, your blog sidebar is probably distracting the visitor with links to other unrelated content about cycling, rock climbing or whatever else you write about.</p>
<p>Don&#8217;t distract your readers.</p>
<p>Give your readers <strong>only</strong> what they&#8217;re interested in at that moment and help them find more of it. Doing that will make your visitors stick around longer, browse more pages, and even improve your SEO!</p>
<p>Here&#8217;s how you can achieve that.<span id="more-776"></span></p>
<h2>Clean Up Your Sidebars</h2>
<p>On your <strong>post pages</strong>, you don&#8217;t have to tell the reader about all the categories and tags that you write about. Why would you clutter your sidebar with such information?</p>
<p>A list of categories and a tag cloud are useful information on the <strong>homepage</strong> because they give your reader an overview of the things that you write about. So, you can put those on the sidebar of the homepage, but not the sidebar of posts pages.</p>
<p>The problem is that most WordPress themes don&#8217;t separate the site-wide sidebar from the post sidebar. It is, however, essential to have a separate sidebar for posts if you&#8217;re serious about improving the navigation and layout of your blog. If your theme has a single sidebar for everything, read this post to learn how to <a href="http://msafi.com/how-to-make-posts-have-different-sidebar-from-the-rest-of-wordpress-blog/">give your posts their own sidebar</a>.</p>
<h2>Ideas for Relevant Content to Put on Your Posts Sidebar</h2>
<p>The more a Web page is focused on a single topic and the more links to other related Web pages it has, the more search engine optimization weight it&#8217;ll carry for that topic. Making your sidebar relevant to the topic of the post itself will have huge benefits for your blog. Here are some ideas of the relevant content put on your sidebar:</p>
<ul>
<li>Related links to other posts on the same topic on your blog</li>
<li>A list of categories that the post belongs to</li>
<li>A list of tags that the post belongs to</li>
<li>RSS feed for the categories and tags that the post belongs to</li>
</ul>
<h2>Use a Related Posts Plugin</h2>
<p>Perhaps the best thing you could do to improve the navigation of your blog is to use a related posts plugin. The most popular plugin for this function is <a href="http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/">Yet Another Related Posts Plugin</a> (YARPP).</p>
<p>Read this post to learn how you can <a href="http://msafi.com/fix-yet-another-related-posts-plugin-yarpp-widget-and-add-it-to-the-sidebar/">put links to related posts on your sidebar using YARPP</a>.</p>
<p>I hope you found these tips helpful. If you have any questions, comments, or suggestions on what else can be done to improve navigation, post them below! <img src='http://msafi.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>


<p>Related posts:<ol><li><a href='http://msafi.com/fix-yet-another-related-posts-plugin-yarpp-widget-and-add-it-to-the-sidebar/' rel='bookmark' title='Permanent Link: Fix Yet Another Related Posts Plugin (YARPP) Widget and Add it to the Sidebar'>Fix Yet Another Related Posts Plugin (YARPP) Widget and Add it to the Sidebar</a></li>
<li><a href='http://msafi.com/how-to-make-posts-have-different-sidebar-from-the-rest-of-wordpress-blog/' rel='bookmark' title='Permanent Link: Give Posts Their Own Sidebar in WordPress'>Give Posts Their Own Sidebar in WordPress</a></li>
<li><a href='http://msafi.com/sensible-use-of-tags-in-a-wordpress-blog/' rel='bookmark' title='Permanent Link: Sensible Use of &#8220;Tags&#8221; in a WordPress Blog'>Sensible Use of &#8220;Tags&#8221; in a WordPress Blog</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://msafi.com/clean-your-wordpress-sidebar-to-improve-navigation-and-seo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Give Posts Their Own Sidebar in WordPress</title>
		<link>http://msafi.com/how-to-make-posts-have-different-sidebar-from-the-rest-of-wordpress-blog/</link>
		<comments>http://msafi.com/how-to-make-posts-have-different-sidebar-from-the-rest-of-wordpress-blog/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 09:11:43 +0000</pubDate>
		<dc:creator>MK</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Sidebar]]></category>

		<guid isPermaLink="false">http://msafi.com/?p=811</guid>
		<description><![CDATA[One way to improve the structure of your WordPress blog is to create multiple sidebars. More specifically, make the content of the sidebar that appears on post pages different from the content that appear on the site-wide sidebar. In this tutorial, I will show you the proper way to create a dynamic sidebar that is [...]


Related posts:<ol><li><a href='http://msafi.com/fix-yet-another-related-posts-plugin-yarpp-widget-and-add-it-to-the-sidebar/' rel='bookmark' title='Permanent Link: Fix Yet Another Related Posts Plugin (YARPP) Widget and Add it to the Sidebar'>Fix Yet Another Related Posts Plugin (YARPP) Widget and Add it to the Sidebar</a></li>
<li><a href='http://msafi.com/clean-your-wordpress-sidebar-to-improve-navigation-and-seo/' rel='bookmark' title='Permanent Link: Clean Your WordPress Sidebar to Improve Navigation and SEO!'>Clean Your WordPress Sidebar to Improve Navigation and SEO!</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>One way to improve the structure of your WordPress blog is to create multiple sidebars. More specifically, make the content of the sidebar that appears on post pages different from the content that appear on the site-wide sidebar.</p>
<p>In this tutorial, I will show you the proper way to create a dynamic sidebar that is solely for posts.<span id="more-811"></span></p>
<h2>Create a PHP File for the Sidebar</h2>
<p>The first step is creating the actual PHP template file for the sidebar. Name the file <code>sidebar-post.php</code>. Put this file in the same folder where <code>sidebar.php</code> exists. Now copy the content of <code>sidebar.php</code> to the new file.</p>
<p>My <code>sidebar.php</code> looks like this:</p>
<pre class="brush: php; gutter: true;">&lt;?php global $vigilance; ?&gt;
  &lt;div id=&quot;sidebar&quot;&gt;
    &lt;?php if ($vigilance-&gt;sideimgState() == 'hide') : else : ?&gt;
      &lt;?php if (is_file(STYLESHEETPATH . '/sidebar-imagebox.php')) include(STYLESHEETPATH . '/sidebar-imagebox.php'); else include(TEMPLATEPATH . '/sidebar-imagebox.php'); ?&gt;
    &lt;?php endif; ?&gt;
    &lt;?php if ($vigilance-&gt;feedState() == 'disabled') : else : ?&gt;
      &lt;?php if (is_file(STYLESHEETPATH . '/sidebar-feedbox.php')) include(STYLESHEETPATH . '/sidebar-feedbox.php'); else include(TEMPLATEPATH . '/sidebar-feedbox.php'); ?&gt;
    &lt;?php endif; ?&gt;
    &lt;ul&gt;
      &lt;?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('right_sidebar') ) : ?&gt;
        &lt;li class=&quot;widget widget_recent_entries&quot;&gt;
          &lt;h2 class=&quot;widgettitle&quot;&gt;&lt;?php _e('Recent Articles'); ?&gt;&lt;/h2&gt;
          &lt;ul&gt;
            &lt;?php $side_posts = get_posts('numberposts=10'); foreach($side_posts as $post) : ?&gt;
            &lt;li&gt;&lt;a href= &quot;&lt;?php the_permalink(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/li&gt;
            &lt;?php endforeach; ?&gt;
          &lt;/ul&gt;
        &lt;/li&gt;
      &lt;?php endif; ?&gt;
    &lt;/ul&gt;
    &lt;?php if (is_active_sidebar('left_sidebar')) echo '&lt;ul class=&quot;thin-sidebar spad&quot;&gt;';?&gt;
      &lt;?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('left_sidebar') ) : endif; ?&gt;
    &lt;?php if (is_active_sidebar('left_sidebar')) echo '&lt;/ul&gt;'; ?&gt;
    &lt;?php if (is_active_sidebar('right_sidebar')) echo '&lt;ul class=&quot;thin-sidebar&quot;&gt;'; ?&gt;
      &lt;?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('right_sidebar') ) : endif; ?&gt;
    &lt;?php if (is_active_sidebar('right_sidebar')) echo '&lt;/ul&gt;' ;?&gt;
  &lt;/div&gt;&lt;!--end sidebar--&gt;</pre>
<p>Unless you&#8217;re using the same theme that I copied this code from, <a href="http://themes.jestro.com/vigilance/">Vigilance</a>, you&#8217;ll most certainly have different code. Look at the code you&#8217;ve copied and find what looks like this:</p>
<pre class="brush: php;">if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('right_sidebar') ) : ?&amp;gt;</pre>
<p>In your new file, <code>sidebar-post.php</code>, you should substitute <code>right_sidebar</code> (or whatever you have) with <code>post_sidebar</code>.</p>
<h2>Register the Dynamic Post Sidebar</h2>
<p>Now that you&#8217;ve created the PHP file for a widget-enabled sidebar, it is time to register this sidebar so that you can add widgets to it. You&#8217;ll have to  look into how your theme registers sidebars. In your theme&#8217;s folder, you should find a file called <code>functions.php</code>. In that file, look for a line that looks like this:</p>
<pre class="brush: php;">if ( function_exists('register_sidebar') ) register_sidebar(array(</pre>
<p>The code in the theme that I&#8217;m using here is this:</p>
<pre class="brush: php;">if ( function_exists('register_sidebar') )
    register_sidebar(array(
        'name'=&gt; __('Right Sidebar', 'vigilance'),
        'id' =&gt; 'right_sidebar',
        'before_widget' =&gt; '&lt;li id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&gt;',
        'after_widget' =&gt; '&lt;/li&gt;',
        'before_title' =&gt; '&lt;h2 class=&quot;widgettitle&quot;&gt;',
        'after_title' =&gt; '&lt;/h2&gt;',
    ));</pre>
<p>In the code above, you&#8217;d have to substitute <code>Right Sidebar</code> with <code>Post Sidebar</code> and <code>right_sidebar</code> with <code>post_sidebar</code>. Apply the equivalent changes to your own theme&#8217;s code.</p>
<h2>Finally, Call Your New Sidebar from single.php</h2>
<p>In most WordPress themes, a post page is displayed using the <code>single.php</code> template file. This file is where a sidebar gets called on. You&#8217;ll have to edit the line that calls the main sidebar to make it call the new sidebar that you&#8217;ve created above.</p>
<p><code>single.php</code> is located at the main folder of the theme. In your <code>single.php</code>, look for the code <code>get_sidebar();</code> and edit it to <code>get_sidebar('post');</code>.</p>
<p>That&#8217;s it! Now your post pages will display their own separate sidebar. To add widgets to this new sidebar, go to the widgets panel, find the sidebar named &#8220;Post Sidebar&#8221;, and drag widgets to it.</p>
<p>I hope you found this tutorial helpful. If you have any comments, questions, or suggestions, please post them below <img src='http://msafi.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>


<p>Related posts:<ol><li><a href='http://msafi.com/fix-yet-another-related-posts-plugin-yarpp-widget-and-add-it-to-the-sidebar/' rel='bookmark' title='Permanent Link: Fix Yet Another Related Posts Plugin (YARPP) Widget and Add it to the Sidebar'>Fix Yet Another Related Posts Plugin (YARPP) Widget and Add it to the Sidebar</a></li>
<li><a href='http://msafi.com/clean-your-wordpress-sidebar-to-improve-navigation-and-seo/' rel='bookmark' title='Permanent Link: Clean Your WordPress Sidebar to Improve Navigation and SEO!'>Clean Your WordPress Sidebar to Improve Navigation and SEO!</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://msafi.com/how-to-make-posts-have-different-sidebar-from-the-rest-of-wordpress-blog/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
