Support » Fixing WordPress » get_categories in functions.php (WP 2.8)

  • Resolved webdemar

    (@webdemar)


    Hi all,

    just experienced a mayor problem with get_categories() in my themes under WordPress 2.8. The function seems to work right in any template file. But if you put

    <pre><?php print_r(get_categories()); ?></pre>

    in the functions.php it will return

    Array
    (
    [errors] => Array
    (
    [invalid_taxonomy] => Array
    (
    [0] => Invalid Taxonomy
    )

    )

    [error_data] => Array
    (
    )

    )

    In the theme options page I use a select input field to let the user pick categories. This select field is empty now due to the error.

    Anybody has the same issue and an idea how to solve this? Thanks in advance!

    Simon

Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘get_categories in functions.php (WP 2.8)’ is closed to new replies.