<?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>WP Garage &#187; functions</title>
	<atom:link href="http://wpgarage.com/tag/functions/feed/" rel="self" type="application/rss+xml" />
	<link>http://wpgarage.com</link>
	<description>wordpress tricks, hacks, and tips</description>
	<lastBuildDate>Thu, 08 Jul 2010 15:11:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to rename widgetized sidebars in Wordpress</title>
		<link>http://wpgarage.com/code-snippets/rename-widgetized-sidebars-in-wordpress/</link>
		<comments>http://wpgarage.com/code-snippets/rename-widgetized-sidebars-in-wordpress/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 11:01:08 +0000</pubDate>
		<dc:creator>Rebecca Markowitz</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[WordPress as CMS]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[names]]></category>
		<category><![CDATA[sidebar]]></category>
		<category><![CDATA[widgetized sidebar]]></category>
		<category><![CDATA[widgets]]></category>

		<guid isPermaLink="false">http://wordpressgarage.com/code-snippets/rename-widgetized-sidebars-in-wordpress/</guid>
		<description><![CDATA[You can manage multiple sidebar widgets in WordPress. To do so, you go to the Widgets page in the Admin, and select the Sidebar you want to manage. If you have 1 widgetized sidebar, the name &#8220;Sidebar 1&#8243;  is not a big deal for managing it. But what if you have 5 or more, [...]]]></description>
			<content:encoded><![CDATA[<p>You can manage multiple sidebar widgets in WordPress. To do so, you go to the Widgets page in the Admin, and select the Sidebar you want to manage. If you have 1 widgetized sidebar, the name &#8220;Sidebar 1&#8243;  is not a big deal for managing it. But what if you have 5 or more, and they&#8217;re named Sidebar 1, Sidebar 2, etc. Ah yes, now what was  that wily sidebar 3 for?</p>
<p>Why would someone have so many sidebars to begin with? Well, remember that you can also add <a href="http://www.sueblimely.com/add-widget-ready-sidebars-to-wordpress-footers/">widget-ready sidebars to Wordpress footers</a> or anywhere in your design, to give extra content management options to clients.</p>
<p>Recently, we had a client with way too many widgetized sidebars to  keep track of, so we had to find a new solution to change the standard widget sidebar names like &#8220;sidebar 1&#8243; or &#8220;sidebar 2&#8243; to something  more meaningful like &#8220;Left sidebar&#8221; and &#8220;Right sidebar&#8221; in the admin  area. I dug around the web and found 2 very helpful posts:</p>
<ul>
<li><a href="http://www.blogherald.com/2007/05/24/how-to-use-widgets-with-more-than-one-sidebar-on-your-wordpress-blog/">How to use widgets with more than one sidebar on your WordPress blog</a></li>
<li><a href="http://internetducttape.com/2007/04/09/howto-design-a-variable-sidebar-wordpress-theme-with-widgets/">How to design a variable sidebar WordPress theme with widgets (by guest blogger Daria Black)</a></li>
</ul>
<p>Here&#8217;s what I learned:</p>
<p>1. Go into your themes&#8217;s <strong>function.php </strong>file, or if it doesn&#8217;t exist, create it.</p>
<p>Add the following code:</p>
<blockquote><p><strong>&lt;?php</strong></p>
<p><strong> if (function_exists(&#8216;register_sidebar&#8217;))</strong></p>
<p><strong>{</strong></p>
<p><strong>register_sidebar(array(</strong></p>
<p><strong>&#8216;before_widget&#8217; =&gt; &#8216;&lt;li&gt;&#8217;,</strong></p>
<p><strong>&#8216;after_widget&#8217; =&gt; &#8216;&lt;/li&gt;&#8217;,</strong></p>
<p><strong>&#8216;before_title&#8217; =&gt; &#8216;&lt;h4&gt;&#8217;,</strong></p>
<p><strong>&#8216;after_title&#8217; =&gt; &#8216;&lt;/h4&gt;&#8217;,</strong></p>
<p><strong></strong><strong>&#8216;name&#8217; =&gt; &#8216;Left sidebar&#8217;</strong></p>
<p><strong>));</strong></p>
<p><strong>register_sidebar(array(</strong></p>
<p><strong>&#8216;before_widget&#8217; =&gt; &#8216;&lt;li&gt;&#8217;,</strong></p>
<p><strong>&#8216;after_widget&#8217; =&gt; &#8216;&lt;/li&gt;&#8217;,</strong></p>
<p><strong>&#8216;before_title&#8217; =&gt; &#8216;&lt;h4&gt;&#8217;,</strong></p>
<p><strong>&#8216;after_title&#8217; =&gt; &#8216;&lt;/h4&gt;&#8217;,</strong></p>
<p><strong>&#8216;name&#8217; =&gt; &#8216;Right sidebar&#8217;</strong></p>
<p><strong>));</strong></p>
<p><strong>}</strong></p>
<p><strong>?&gt;</strong></p></blockquote>
<p>2a. Add a widgetized sidebar to your theme. Open up your theme&#8217;s sidebar file (for exampe, l_sidebar.php) and look for the first &lt;ul&gt; or &lt;ul id=&#8221;sidebar&#8221;&gt; or something similar, and add the following code:</p>
<blockquote><p><strong>&lt;?php if ( !function_exists(&#8216;dynamic_sidebar&#8217;) || !dynamic_sidebar(&#8216;Left sidebar&#8217;) ) : ?&gt;</strong></p></blockquote>
<p>2b. If your sidebar is already widgetized, find the following code</p>
<blockquote>
<blockquote><p><strong>&lt;?php if ( function_exists(&#8216;dynamic_sidebar&#8217;) &amp;&amp; dynamic_sidebar(1) ) : else : ?&gt;</strong></p></blockquote>
<p>and replace it with</p>
<blockquote><p><strong>&lt;?php if ( !function_exists(&#8216;dynamic_sidebar&#8217;) || !dynamic_sidebar(&#8216;Left sidebar&#8217;) ) : ?&gt;</strong></p></blockquote>
</blockquote>
<p>Then, find the closing &lt;/ul&gt; at the very bottom of the file, and immediately before that, place</p>
<p><strong>&lt;?php endif; ?&gt;</strong></p>
<p>3. Now, if you go into your admin panel, under Design&gt;Widgets, you&#8217;ll see the new names like in the image below.</p>
<p><img class="alignnone size-full wp-image-381" title="widgets" src="http://wpgarage.com/wp-content/uploads/2008/11/widgets.png" alt="" width="312" height="165" /></p>
<p>Now you can easily manage your Widgets without trying to guess which one is which.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://wpgarage.com/code-snippets/rename-widgetized-sidebars-in-wordpress/&amp;title=How+to+rename+widgetized+sidebars+in+Wordpress" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://wpgarage.com/code-snippets/rename-widgetized-sidebars-in-wordpress/&amp;title=How+to+rename+widgetized+sidebars+in+Wordpress" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://wpgarage.com/code-snippets/rename-widgetized-sidebars-in-wordpress/&amp;title=How+to+rename+widgetized+sidebars+in+Wordpress&amp;desc=You%20can%20manage%20multiple%20sidebar%20widgets%20in%20WordPress.%20To%20do%20so%2C%20you%20go%20to%20the%20Widgets%20page%20in%20the%20Admin%2C%20and%20select%20the%20Sidebar%20you%20want%20to%20manage.%20If%20you%20have%201%20widgetized%20sidebar%2C%20the%20name%20%22Sidebar%201%22%20%20is%20not%20a%20big%20deal%20for%20managing%20it.%20But%20what%20if%20you%20have%205%20or%20more%2C%20and%20they%27re%20named%20Sidebar%201%2C%20" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://wpgarage.com/code-snippets/rename-widgetized-sidebars-in-wordpress/&amp;t=How+to+rename+widgetized+sidebars+in+Wordpress" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-friendfeed">
			<a href="http://www.friendfeed.com/share?title=How+to+rename+widgetized+sidebars+in+Wordpress&amp;link=http://wpgarage.com/code-snippets/rename-widgetized-sidebars-in-wordpress/" rel="nofollow" class="external" title="Share this on FriendFeed">Share this on FriendFeed</a>
		</li>
		<li class="shr-gmail">
			<a href="https://mail.google.com/mail/?ui=2&amp;view=cm&amp;fs=1&amp;tf=1&amp;su=How+to+rename+widgetized+sidebars+in+Wordpress&amp;body=Link: http://wpgarage.com/code-snippets/rename-widgetized-sidebars-in-wordpress/ (sent via shareaholic)%0D%0A%0D%0A----%0D%0A You%20can%20manage%20multiple%20sidebar%20widgets%20in%20WordPress.%20To%20do%20so%2C%20you%20go%20to%20the%20Widgets%20page%20in%20the%20Admin%2C%20and%20select%20the%20Sidebar%20you%20want%20to%20manage.%20If%20you%20have%201%20widgetized%20sidebar%2C%20the%20name%20%22Sidebar%201%22%20%20is%20not%20a%20big%20deal%20for%20managing%20it.%20But%20what%20if%20you%20have%205%20or%20more%2C%20and%20they%27re%20named%20Sidebar%201%2C%20" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://wpgarage.com/code-snippets/rename-widgetized-sidebars-in-wordpress/&amp;title=How+to+rename+widgetized+sidebars+in+Wordpress" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://wpgarage.com/code-snippets/rename-widgetized-sidebars-in-wordpress/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.google.com/reader/link?url=http://wpgarage.com/code-snippets/rename-widgetized-sidebars-in-wordpress/&amp;title=How+to+rename+widgetized+sidebars+in+Wordpress&amp;srcUrl=http://wpgarage.com/code-snippets/rename-widgetized-sidebars-in-wordpress/&amp;srcTitle=How+to+rename+widgetized+sidebars+in+Wordpress&amp;snippet=You%20can%20manage%20multiple%20sidebar%20widgets%20in%20WordPress.%20To%20do%20so%2C%20you%20go%20to%20the%20Widgets%20page%20in%20the%20Admin%2C%20and%20select%20the%20Sidebar%20you%20want%20to%20manage.%20If%20you%20have%201%20widgetized%20sidebar%2C%20the%20name%20%22Sidebar%201%22%20%20is%20not%20a%20big%20deal%20for%20managing%20it.%20But%20what%20if%20you%20have%205%20or%20more%2C%20and%20they%27re%20named%20Sidebar%201%2C%20" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://wpgarage.com/code-snippets/rename-widgetized-sidebars-in-wordpress/&amp;title=How+to+rename+widgetized+sidebars+in+Wordpress&amp;summary=You%20can%20manage%20multiple%20sidebar%20widgets%20in%20WordPress.%20To%20do%20so%2C%20you%20go%20to%20the%20Widgets%20page%20in%20the%20Admin%2C%20and%20select%20the%20Sidebar%20you%20want%20to%20manage.%20If%20you%20have%201%20widgetized%20sidebar%2C%20the%20name%20%22Sidebar%201%22%20%20is%20not%20a%20big%20deal%20for%20managing%20it.%20But%20what%20if%20you%20have%205%20or%20more%2C%20and%20they%27re%20named%20Sidebar%201%2C%20&amp;source=WP Garage" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-netvibes">
			<a href="http://www.netvibes.com/share?title=How+to+rename+widgetized+sidebars+in+Wordpress&amp;url=http://wpgarage.com/code-snippets/rename-widgetized-sidebars-in-wordpress/" rel="nofollow" class="external" title="Submit this to Netvibes">Submit this to Netvibes</a>
		</li>
		<li class="shr-posterous">
			<a href="http://posterous.com/share?linkto=http://wpgarage.com/code-snippets/rename-widgetized-sidebars-in-wordpress/&amp;title=How+to+rename+widgetized+sidebars+in+Wordpress&amp;selection=You%20can%20manage%20multiple%20sidebar%20widgets%20in%20WordPress.%20To%20do%20so%2C%20you%20go%20to%20the%20Widgets%20page%20in%20the%20Admin%2C%20and%20select%20the%20Sidebar%20you%20want%20to%20manage.%20If%20you%20have%201%20widgetized%20sidebar%2C%20the%20name%20%22Sidebar%201%22%20%20is%20not%20a%20big%20deal%20for%20managing%20it.%20But%20what%20if%20you%20have%205%20or%20more%2C%20and%20they%27re%20named%20Sidebar%201%2C%20" rel="nofollow" class="external" title="Post this to Posterous">Post this to Posterous</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://wpgarage.com/code-snippets/rename-widgetized-sidebars-in-wordpress/&amp;title=How+to+rename+widgetized+sidebars+in+Wordpress" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-slashdot">
			<a href="http://slashdot.org/bookmark.pl?url=http://wpgarage.com/code-snippets/rename-widgetized-sidebars-in-wordpress/&amp;title=How+to+rename+widgetized+sidebars+in+Wordpress" rel="nofollow" class="external" title="Submit this to SlashDot">Submit this to SlashDot</a>
		</li>
		<li class="shr-sphinn">
			<a href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http://wpgarage.com/code-snippets/rename-widgetized-sidebars-in-wordpress/" rel="nofollow" class="external" title="Sphinn this on Sphinn">Sphinn this on Sphinn</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://wpgarage.com/code-snippets/rename-widgetized-sidebars-in-wordpress/&amp;title=How+to+rename+widgetized+sidebars+in+Wordpress" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-techmeme">
			<a href="http://twitter.com/home/?status=Tip+@Techmeme+http://wpgarage.com/code-snippets/rename-widgetized-sidebars-in-wordpress/+&quot;How+to+rename+widgetized+sidebars+in+Wordpress&quot;&amp;source=shareaholic" rel="nofollow" class="external" title="Tip this to TechMeme">Tip this to TechMeme</a>
		</li>
		<li class="shr-tumblr">
			<a href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fwpgarage.com%2Fcode-snippets%2Frename-widgetized-sidebars-in-wordpress%2F&amp;t=How+to+rename+widgetized+sidebars+in+Wordpress" rel="nofollow" class="external" title="Share this on Tumblr">Share this on Tumblr</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=How+to+rename+widgetized+sidebars+in+Wordpress+-++%28via+%40wpgarage%29&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-mail">
			<a href="mailto:?subject=%22How%20to%20rename%20widgetized%20sidebars%20in%20Wordpress%22&amp;body=Link: http://wpgarage.com/code-snippets/rename-widgetized-sidebars-in-wordpress/ (sent via shareaholic)%0D%0A%0D%0A----%0D%0A You%20can%20manage%20multiple%20sidebar%20widgets%20in%20WordPress.%20To%20do%20so%2C%20you%20go%20to%20the%20Widgets%20page%20in%20the%20Admin%2C%20and%20select%20the%20Sidebar%20you%20want%20to%20manage.%20If%20you%20have%201%20widgetized%20sidebar%2C%20the%20name%20%22Sidebar%201%22%20%20is%20not%20a%20big%20deal%20for%20managing%20it.%20But%20what%20if%20you%20have%205%20or%20more%2C%20and%20they%27re%20named%20Sidebar%201%2C%20" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="shr-printfriendly">
			<a href="http://www.printfriendly.com/print?url=http://wpgarage.com/code-snippets/rename-widgetized-sidebars-in-wordpress/" rel="nofollow" class="external" title="Send this page to Print Friendly">Send this page to Print Friendly</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://wpgarage.com/code-snippets/rename-widgetized-sidebars-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
