WordPress.org

Ready to get started?Download WordPress

Forums

More Taxonomies
Registering Hierarchical Taxonomies Incorrectly (2 posts)

  1. lewismcarey
    Member
    Posted 2 years ago #

    I have encountered an instance where another plugin is checking if a taxonomy is hierarchichal.

    Hierarchical taxonomies from More Taxonomies do not seem to appear. This is because of the following:

    $taxonomy_info = get_taxonomy($taxonomy_name);
        if ($taxonomy_info->hierarchical !== TRUE) {
     ... some code that hides non-hierarchical taxonomies
        }

    Although the default value for the hierarchical property is 'true'. When you update the taxonomy it sets it to the field value '1' (I think).
    I believe this may be because it is registering it as a number and not as a boolean.

    I have updated their plugin to:

    $taxonomy_info = get_taxonomy($taxonomy_name);
        if ($taxonomy_info->hierarchical != TRUE) {
     ... some code
        }

    but thought it may be one to consider for compatibly with other plugins too.

    http://wordpress.org/extend/plugins/more-taxonomies/

  2. lewismcarey
    Member
    Posted 2 years ago #

    Could you be enclosing the value in single quotes meaning it is a string?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic