<?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; category</title>
	<atom:link href="http://wpfunc.com/tag/category/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>Category Cloud!</title>
		<link>http://wpfunc.com/wordpress/category-cloud.html</link>
		<comments>http://wpfunc.com/wordpress/category-cloud.html#comments</comments>
		<pubDate>Tue, 15 Mar 2011 12:07:43 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[category]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[tag cloud]]></category>

		<guid isPermaLink="false">http://www.wpfunc.com/?p=470</guid>
		<description><![CDATA[You can make category cloud like tag cloud with this function. Here is the code; Insert this code into your theme&#8217;s functions.php; And use this code where you want; Have a nice day!]]></description>
			<content:encoded><![CDATA[<p>You can make category cloud like tag cloud with this function.<br />
<span id="more-470"></span></p>
<h3>Here is the code;</h3>
<p>Insert this code into your theme&#8217;s <span style="color: #ff0000;"><strong>functions.php</strong></span>;</p>
<pre class="brush: php; title: ; notranslate">//Category cloud
function nube(){
  $categories=  get_categories('child_of=0&amp;type=post&amp;orderby=name&amp;number=500rand&amp;order=asc');
  foreach ($categories as $category) {
	  $font=@intval($category-&gt;category_count/2);

	  $color=&quot;#000000&quot;;
	  if($font&lt;10){
		  $font=10;
		  $color=&quot;#AAAAAA&quot;;
	  }
	  if($font&gt;15 &amp;&amp; $font&lt;30){
		  $font=15;
		  $color=&quot;#8CC7FF&quot;;
	  }
	if($font&gt;=30){
		$font=30;
		$color=&quot;#ff0000&quot;;
	}

	if($category-&gt;category_count&gt;4){
  	$resp .= '&lt;a title=&quot;Total Article: '.$category-&gt;category_count.'&quot;style=&quot;font-size:'.$font.'px;color:'.$color.'&quot; href=&quot;/category/'.$category-&gt;category_nicename.'&quot;&gt;'.$category-&gt;cat_name.'&lt;/a&gt; ';
			}
  }
  return $resp;
}
//Category Cloud</pre>
<p>And use this code where you want;</p>
<pre class="brush: php; title: ; notranslate">&lt;?php echo nube(); ?&gt;</pre>
<p>Have a nice day!</p>
]]></content:encoded>
			<wfw:commentRss>http://wpfunc.com/wordpress/category-cloud.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Show Category Description without a plugin!</title>
		<link>http://wpfunc.com/wordpress/show-category-description-without-a-plugin.html</link>
		<comments>http://wpfunc.com/wordpress/show-category-description-without-a-plugin.html#comments</comments>
		<pubDate>Mon, 30 Nov 2009 10:48:01 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[archive.php]]></category>
		<category><![CDATA[category]]></category>
		<category><![CDATA[category_description]]></category>
		<category><![CDATA[description]]></category>
		<category><![CDATA[echo]]></category>
		<category><![CDATA[function]]></category>

		<guid isPermaLink="false">http://www.wpfunc.com/?p=307</guid>
		<description><![CDATA[You can show your ategory description without a plugin. It&#8217;s needed only one-line code. When you add this code you can show your category description after the title or where you want. Lets begin&#8230; Here is the code; You can add this lines to archive.php (category section) or where you want. Selected category&#8217;s description shown [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">You can show your ategory description without a plugin. It&#8217;s needed only one-line code. When you add this code you can show your category description after the title or where you want. Lets begin&#8230;<span id="more-307"></span></p>
<h3 style="text-align: justify;">Here is the code;</h3>
<pre class="brush: php; title: ; notranslate">&lt;?php echo category_description(); ?&gt;</pre>
<p style="text-align: justify;">You can add this lines to archive.php (category section) or where you want. Selected category&#8217;s description shown after title. You can add css templates for this. Look at more information ;)</p>
<p style="text-align: justify;"><a href="http://codex.wordpress.org/es:Category_Templates" target="_blank">More information (Spanish)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wpfunc.com/wordpress/show-category-description-without-a-plugin.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Create a shortcode for displaying the Loop</title>
		<link>http://wpfunc.com/wordpress/create-a-shortcode-for-displaying-the-loop.html</link>
		<comments>http://wpfunc.com/wordpress/create-a-shortcode-for-displaying-the-loop.html#comments</comments>
		<pubDate>Tue, 10 Nov 2009 11:31:05 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[category]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[Loop]]></category>
		<category><![CDATA[shortcode]]></category>
		<category><![CDATA[the_loop]]></category>

		<guid isPermaLink="false">http://www.wpfunc.com/?p=277</guid>
		<description><![CDATA[Hi everybody. We can use WordPress as a CMS and we can change default loop area displaying for anywhere. We have to make a shortcode for this. Let&#8217;s Begin&#8230; Here is the code; Add this code to your theme&#8217;s functions.php and use shortcode in your teheme. ShortCode; That&#8217;s All. Have a nice day!]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Hi everybody. We can use WordPress as a CMS and we can change default loop area displaying for anywhere. We have to make a shortcode for this. Let&#8217;s Begin&#8230;<span id="more-277"></span></p>
<h3>Here is the code;</h3>
<p style="text-align: justify;">Add this code to your theme&#8217;s <span style="color: #ff0000;"><em><strong>functions.php</strong></em></span> and use <span style="color: #ff0000;"><em><strong>shortcode</strong></em></span> in your teheme.</p>
<pre class="brush: php; title: ; notranslate">function myLoop($atts, $content = null) {
	extract(shortcode_atts(array(
		&quot;pagination&quot; =&gt; 'true',
		&quot;query&quot; =&gt; '',
		&quot;category&quot; =&gt; '',
	), $atts));
	global $wp_query,$paged,$post;
	$temp = $wp_query;
	$wp_query= null;
	$wp_query = new WP_Query();
	if($pagination == 'true'){
		$query .= '&amp;paged='.$paged;
	}
	if(!empty($category)){
		$query .= '&amp;category_name='.$category;
	}
	if(!empty($query)){
		$query .= $query;
	}
	$wp_query-&gt;query($query);
	ob_start();
	?&gt;
	&lt;h2&gt;&lt;?php echo $category; ?&gt;&lt;/h2&gt;
	&lt;ul class=&quot;loop&quot;&gt;
	&lt;?php while ($wp_query-&gt;have_posts()) : $wp_query-&gt;the_post(); ?&gt;
		&lt;li&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot; rel=&quot;bookmark&quot;&gt;&lt;?php echo $thumbnail_image; the_title(); ?&gt;&lt;/a&gt;&lt;/li&gt;
	&lt;?php endwhile; ?&gt;
	&lt;/ul&gt;
	&lt;?php if(pagination == 'true'){ ?&gt;
	&lt;div class=&quot;navigation&quot;&gt;
	  &lt;div class=&quot;alignleft&quot;&gt;&lt;?php previous_posts_link('« Previous') ?&gt;&lt;/div&gt;
	  &lt;div class=&quot;alignright&quot;&gt;&lt;?php next_posts_link('More »') ?&gt;&lt;/div&gt;
	&lt;/div&gt;
	&lt;?php } ?&gt;
	&lt;?php $wp_query = null; $wp_query = $temp;
	$content = ob_get_contents();
	ob_end_clean();
	return $content;
}
add_shortcode(&quot;loop&quot;, &quot;myLoop&quot;);
</pre>
<h3>ShortCode;</h3>
<pre class="brush: php; title: ; notranslate">[loop category=&quot;news&quot; query=&quot;&quot; pagination=&quot;false&quot;]</pre>
<p>That&#8217;s All. Have a nice day!</p>
]]></content:encoded>
			<wfw:commentRss>http://wpfunc.com/wordpress/create-a-shortcode-for-displaying-the-loop.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Make an Archives Page Template</title>
		<link>http://wpfunc.com/wordpress/make-an-archives-page-template.html</link>
		<comments>http://wpfunc.com/wordpress/make-an-archives-page-template.html#comments</comments>
		<pubDate>Fri, 02 Oct 2009 17:48:47 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[archive template]]></category>
		<category><![CDATA[archives]]></category>
		<category><![CDATA[archives.php]]></category>
		<category><![CDATA[author]]></category>
		<category><![CDATA[category]]></category>
		<category><![CDATA[post]]></category>

		<guid isPermaLink="false">http://www.wpfunc.com/wordpress/make-an-archives-page-template.html</guid>
		<description><![CDATA[As default themes have an archives.php. But if you want to make changes on your arcihves.php or if you&#8217;re an theme developer you can use this template quickly. You can get more information on Codex Page. Lets Begin&#8230; Here is the code; First Create an information and name area; After that add these lines for [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">As default themes have an archives.php. But if you want to make changes on your arcihves.php or if you&#8217;re an theme developer you can use this template quickly. You can get more information on <a href="http://codex.wordpress.org/Pages#Page_Templates" target="_blank">Codex Page</a>. Lets Begin&#8230;<span id="more-239"></span></p>
<h3>Here is the code;</h3>
<p style="text-align: justify;">First Create an information and name area;</p>
<pre class="brush: plain; title: ; notranslate">&lt;?php
/*
Template Name: Archive page
*/
?&gt;</pre>
<p style="text-align: justify;">After that add these lines for page template; with this code you list all your articles.</p>
<pre class="brush: plain; title: ; notranslate">&lt;?php
$posts_to_show = 100; //Max number of articles to display
$debut = 0; //The first article to be displayed
?&gt;
&lt;?php while(have_posts()) : the_post(); ?&gt;
&lt;h2&gt;&lt;?php the_title(); ?&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;?php
$myposts = get_posts('numberposts=$posts_to_show&amp;offset=$debut');
foreach($myposts as $post) :
?&gt;
&lt;li&gt;&lt;?php the_time('d/m/y') ?&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;?php endwhile; ?&gt;</pre>
<p style="text-align: justify;">And add these lines for category and the others&#8230;</p>
<pre class="brush: plain; title: ; notranslate">&lt;?php while(have_posts()) : the_post(); ?&gt;
&lt;h2&gt;&lt;?php the_title(); ?&gt;&lt;/h2&gt;
&lt;h2&gt;Categories&lt;/h2&gt;
&lt;ul&gt;&lt;?php wp_list_cats('sort_column=name&amp;optioncount=1') ?&gt;&lt;/ul&gt;
&lt;h2&gt;Monthly Archives&lt;/h2&gt;
&lt;ul&gt;&lt;?php wp_get_archives('type=monthly&amp;show_post_count=1') ?&gt;&lt;/ul&gt;
&lt;?php endwhile; ?&gt;</pre>
<p style="text-align: justify;">Now, save the <strong>articles.php</strong> and upload to your template&#8217;s area. Go to Pages &gt; New Page and select the Page Template with Archives.php.</p>
<p style="text-align: justify;">That&#8217;s All&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://wpfunc.com/wordpress/make-an-archives-page-template.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

