WordPress.org

Support

Support » How-To and Troubleshooting » How to get all terms from a custom taxonomy

How to get all terms from a custom taxonomy

  • Hi.

    I have created a custom taxonomy called forum_category and I created some entries in there by using wp-admin.

    When executing this code:

    $terms = get_terms('forum_category');
    print_r($terms);

    it prints an empty array when I expected to get all entries from this taxonomy. Can someone tell me what I’m doing wrong ?

    Thanks.

  • The topic ‘How to get all terms from a custom taxonomy’ is closed to new replies.
Skip to toolbar