<?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>WpFunc &#187; elseif</title>
	<atom:link href="http://wpfunc.com/tag/elseif/feed" rel="self" type="application/rss+xml" />
	<link>http://wpfunc.com</link>
	<description>Awesome, Quick, Simple WordPress Functions!</description>
	<lastBuildDate>Sun, 06 May 2012 02:21:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Show your categories in two Columns!</title>
		<link>http://wpfunc.com/wordpress/show-your-categories-in-two-columns.html</link>
		<comments>http://wpfunc.com/wordpress/show-your-categories-in-two-columns.html#comments</comments>
		<pubDate>Mon, 28 Sep 2009 17:47:09 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[categories]]></category>
		<category><![CDATA[categories in two columns]]></category>
		<category><![CDATA[else]]></category>
		<category><![CDATA[elseif]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[if]]></category>
		<category><![CDATA[sidebar.php]]></category>

		<guid isPermaLink="false">http://www.wpfunc.com/?p=228</guid>
		<description><![CDATA[I said about if and else with two or more single.php article. Also you can use this simple functions on your categories. You can show your categories in two columns. This a simple code and you can apply it only copy/paste :) Here is the code; We use wp_list_categories(); function when we calling our categories. [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">I said about if and else with <a href="http://www.wpfunc.com/wordpress/use-two-or-more-single-php.html" target="_blank">two or more single.php</a> article. Also you can use this simple functions on your categories. You can show your categories in two columns. This a simple code and you can apply it only copy/paste :)<span id="more-228"></span></p>
<h3>Here is the code;</h3>
<p style="text-align: justify;">We use <em><strong>wp_list_categories</strong><strong>();</strong></em> function when we calling our categories. But if we change this function we can change our category listing. Just copy and paste this function in your <span style="color: #ff0000;"><em><strong>sidebar.php</strong></em></span> file and show your categories in two columns.</p>
<pre class="brush: plain; title: ; notranslate">&lt;?php
$cats = explode(&quot;&lt;br /&gt;&quot;,wp_list_categories('title_li=&amp;echo=0&amp;depth=1&amp;style=none'));
$cat_n = count($cats) - 1;
for ($i=0;$i&lt;$cat_n;$i++):
if ($i&lt;$cat_n/2):
$cat_left = $cat_left.'&lt;li&gt;'.$cats[$i].'&lt;/li&gt;';
elseif ($i&gt;=$cat_n/2):
$cat_right = $cat_right.'&lt;li&gt;'.$cats[$i].'&lt;/li&gt;';
endif;
endfor;
?&gt;
&lt;ul class=&quot;left&quot;&gt;
&lt;?php echo $cat_left;?&gt;
&lt;/ul&gt;
&lt;ul class=&quot;right&quot;&gt;
&lt;?php echo $cat_right;?&gt;
&lt;/ul&gt;</pre>
<p style="text-align: justify;">After that we have to change our <em><strong>style.css</strong></em> for <em><strong><span style="color: #ff0000;">left</span></strong></em> and<em><strong><span style="color: #ff0000;"> right</span></strong></em> terms. her is the code;</p>
<pre class="brush: css; title: ; notranslate">.right {float:left; width:140px;}
.left {float:left; width:140px;}</pre>
<p style="text-align: justify;">That&#8217;s All. Have a nice day!</p>
<p style="text-align: justify;">The Original Post: <em><strong><a href="http://www.blogohblog.com/10-wordpress-hacks-to-make-your-life-even-easier/" target="_blank">Blog-Oh-Blog</a></strong></em></p>
]]></content:encoded>
			<wfw:commentRss>http://wpfunc.com/wordpress/show-your-categories-in-two-columns.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

