<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: WordPress Category Exists?</title>
	<atom:link href="http://wpengineer.com/wordpress-category-exists/feed/" rel="self" type="application/rss+xml" />
	<link>http://wpengineer.com/wordpress-category-exists/</link>
	<description>WordPress News, Hacks, Tipps, Tutorials, Plugins and Themes</description>
	<lastBuildDate>Sun, 14 Mar 2010 09:10:57 +0000</lastBuildDate>
	
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Fairweb&#187; Développement Wordpress &#187; Wordpress : savoir si une catégorie existe</title>
		<link>http://wpengineer.com/wordpress-category-exists/#comment-1714</link>
		<dc:creator>Fairweb&#187; Développement Wordpress &#187; Wordpress : savoir si une catégorie existe</dc:creator>
		<pubDate>Fri, 11 Sep 2009 09:09:42 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=992#comment-1714</guid>
		<description>[...] Pour information, consultez la page sur ce sujet sur wpengineer.com. [...]</description>
		<content:encoded><![CDATA[<p>[...] Pour information, consultez la page sur ce sujet sur wpengineer.com. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon</title>
		<link>http://wpengineer.com/wordpress-category-exists/#comment-1286</link>
		<dc:creator>Simon</dc:creator>
		<pubDate>Mon, 15 Jun 2009 12:38:19 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=992#comment-1286</guid>
		<description>Hi Michael,

I&#039;m having a similar problem with my themes. You can see the problem in Wordpress 2.8 if you try (in the functions.php or a theme file)

&lt;pre&gt;print_r(get_categories(&#039;hide_empty=0&#039;));&lt;/pre&gt;

I use an array of categories for a select input field in my theme options page. Since WordPress 2.8 it does not work any more.

The functions returns:

&lt;pre&gt;Array
(
    [errors] =&gt; Array
        (
            [invalid_taxonomy] =&gt; Array
                (
                    [0] =&gt; Invalid Taxonomy
                )
        )
    [error_data] =&gt; Array
        (
        )
)&lt;/pre&gt;

Another discussion on this:
http://themeforest.net/forums/thread/wp-28-compatible/13432

Anybody has an idea how to solve this issue? Thanks in advance!

Simon</description>
		<content:encoded><![CDATA[<p>Hi Michael,</p>
<p>I'm having a similar problem with my themes. You can see the problem in Wordpress 2.8 if you try (in the functions.php or a theme file)</p>
<pre>print_r(get_categories('hide_empty=0'));</pre>
<p>I use an array of categories for a select input field in my theme options page. Since WordPress 2.8 it does not work any more.</p>
<p>The functions returns:</p>
<pre>Array
(
    [errors] =&gt; Array
        (
            [invalid_taxonomy] =&gt; Array
                (
                    [0] =&gt; Invalid Taxonomy
                )
        )
    [error_data] =&gt; Array
        (
        )
)</pre>
<p>Another discussion on this:<br />
<a href="http://themeforest.net/forums/thread/wp-28-compatible/13432" rel="nofollow" class="liexternal">http://themeforest.net/forums/thread/wp-28-compatible/13432</a></p>
<p>Anybody has an idea how to solve this issue? Thanks in advance!</p>
<p>Simon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://wpengineer.com/wordpress-category-exists/#comment-1145</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Wed, 20 May 2009 20:33:58 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=992#comment-1145</guid>
		<description>Hm, i see only a problem with orderby =&gt; RAND. Try orderby =&gt; ID or name. &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/get_categories&quot; rel=&quot;nofollow&quot;&gt;See http://codex.wordpress.org/Function_Reference/get_categories&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>Hm, i see only a problem with orderby =&gt; RAND. Try orderby =&gt; ID or name. <a href="http://codex.wordpress.org/Function_Reference/get_categories" rel="nofollow" class="liwp">See </a><a href="http://codex.wordpress.org/Function_Reference/get_categories" rel="nofollow">http://codex.wordpress.org/Function_Reference/get_categories</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jez</title>
		<link>http://wpengineer.com/wordpress-category-exists/#comment-1144</link>
		<dc:creator>jez</dc:creator>
		<pubDate>Wed, 20 May 2009 19:59:42 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=992#comment-1144</guid>
		<description>did they take get_categories out with the latest release of wordpress 2.8 (beta) ?

I used to have 

$index_cats = &#039;16,7,5,10&#039;; // What categories to show on Index page
		$args = array( 
				&#039;orderby&#039; =&gt; &#039;RAND&#039;, 	//ID
				&#039;order&#039; =&gt; &#039;DESC&#039;, // change cat ids so to get right order
				&#039;hierarchical&#039; =&gt; 0, 
				&#039;include&#039; =&gt; $index_cats );  //Which categories to include, set on the theme options page

 		$cats = get_categories($args); //sets up everything to be looped through

		foreach ($cats as $key =&gt; $category) { // loops through categories in array and creates a section for each

		$catID = $category-&gt;cat_ID; //sets catID to category ID number
		$catName = $category-&gt;cat_name; // sets catName to category Name
		$cat = $cats[$key]; // Sets category

and then echo it later-on in my code,
and with wp 2.7.4 it worked, with wp 2.8 it just returns &quot;blank&quot;.

any clues much appreciated, 
gerne auch in deutsch.</description>
		<content:encoded><![CDATA[<p>did they take get_categories out with the latest release of wordpress 2.8 (beta) ?</p>
<p>I used to have </p>
<p>$index_cats = '16,7,5,10'; // What categories to show on Index page<br />
		$args = array(<br />
				'orderby' =&gt; 'RAND', 	//ID<br />
				'order' =&gt; 'DESC', // change cat ids so to get right order<br />
				'hierarchical' =&gt; 0,<br />
				'include' =&gt; $index_cats );  //Which categories to include, set on the theme options page</p>
<p> 		$cats = get_categories($args); //sets up everything to be looped through</p>
<p>		foreach ($cats as $key =&gt; $category) { // loops through categories in array and creates a section for each</p>
<p>		$catID = $category-&gt;cat_ID; //sets catID to category ID number<br />
		$catName = $category-&gt;cat_name; // sets catName to category Name<br />
		$cat = $cats[$key]; // Sets category</p>
<p>and then echo it later-on in my code,<br />
and with wp 2.7.4 it worked, with wp 2.8 it just returns "blank".</p>
<p>any clues much appreciated,<br />
gerne auch in deutsch.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://wpengineer.com/wordpress-category-exists/#comment-892</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Fri, 27 Mar 2009 08:37:07 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=992#comment-892</guid>
		<description>Hey Peter, your welcome. Thanks for letting us know for what practical purpose you also could need it.</description>
		<content:encoded><![CDATA[<p>Hey Peter, your welcome. Thanks for letting us know for what practical purpose you also could need it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://wpengineer.com/wordpress-category-exists/#comment-888</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Thu, 26 Mar 2009 18:16:48 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=992#comment-888</guid>
		<description>I read this yesterday, figured I&#039;d never use it, and then later that night realized that I needed exactly this functionality.

I was putting together a custom feature for a client to automatically post some stuff, and I needed it to create categories if they didnt exist - I figured I&#039;d just loop through the desired categories and check if each of them exists (with category_exists), then create them if necessary - but then I found another function to do it for me - 
function wp_create_categories($categories, $post_id = &#039;&#039;) - it loops through the $categories array and creates the categories if they dont exist, and then applies them to post $post_id (if supplied).

Anyway, I never would have found it if it werent for this post - Thanks!</description>
		<content:encoded><![CDATA[<p>I read this yesterday, figured I'd never use it, and then later that night realized that I needed exactly this functionality.</p>
<p>I was putting together a custom feature for a client to automatically post some stuff, and I needed it to create categories if they didnt exist - I figured I'd just loop through the desired categories and check if each of them exists (with category_exists), then create them if necessary - but then I found another function to do it for me -<br />
function wp_create_categories($categories, $post_id = '') - it loops through the $categories array and creates the categories if they dont exist, and then applies them to post $post_id (if supplied).</p>
<p>Anyway, I never would have found it if it werent for this post - Thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
