Fix get_categories() Problem in Wordpress 2.8

Posted in Wordpress Tips on 19 June 2009 1 comment

I have been using get_categories() to display the featured categories in my theme option page. However, the function does not seems to work anymore after I’ve upgraded to Wordpress 2.8 (It returns an array of error like below).

array(2) { ["errors"]=> array(1) { ["invalid_taxonomy"]=> array(1) { [0]=> string(16) "Invalid Taxonomy" } } ["error_data"]=> array(0) { } }

Now, I am pretty sure Wordpress 2.8.1 will be released very soon.

UPDATE : Wordpress 2.8.1 is already available, please upgrade now.

How to fix it?

- – - This temporary solution was removed because WP 2.8.1 is available now – - -

Side Notes

If you are using get_categories() to display category links in sidebar, you should really use wp_list_categories() instead.

Thank you for reading.

Posted by zen   @   19 June 2009 1 comment
Tags : , , ,


  - 1 Comments


Trackbacks

  1. » ZenVerse – Fix get_categories() problem in Wordpress 2.8 Wordpress UK: Wordpress UK, taking it further…

Leave a Reply

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

Please wrap all source codes with [code][/code] tags. Powered by Source Codes in Comments
Previous Post
« Get & Display Latest Tweets (Twitter Status) using Javascript
Next Post
11 Free & Great Javascript Colour Pickers for Web Development »