• I’ve created custom taxonomy with Types plugin (Currently deactivated).
    In my DDBB I can see in ‘wp_term_taxonomy’ a good list of entries with terms and this category ‘mytaxonomy’ associated to them.
    If I try to check if the category exists with taxonomy_exists() it saids it doesn’t, if I search for empty ones:

    $taxonomy = 'mytaxonomy';
    $term_args=array(
      'hide_empty' => false,
      'orderby' => 'name',
      'order' => 'ASC'
    );
    $tax_terms = get_terms($taxonomy,$term_args);
    if(is_wp_error($tax_terms))
    {
      echo $tax_terms->get_error_message().'<br />';
    }
    else
    {
      echo 'No error';
    }

    It doesn’t exists neither. If I search for custom ones, not built in:

    $args = array(
      'public'   => true,
      '_builtin' => false
    
    );
    $output = 'names'; // or objects
    $operator = 'and'; // 'and' or 'or'
    $taxonomies = get_taxonomies( $args, $output, $operator );
    if ( $taxonomies ) {
      foreach ( $taxonomies  as $taxonomy ) {
        echo '<p>' . $taxonomy . '</p>';
      }
    }

    It doesn’t appear…
    What is exactly what I can see in the DDBB?
    A delusion????
    A need a break now, can somebody, please, explain me this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • I can’t be sure but I believe that you have to have the plugin active if you used the plugin to create the custom taxonomy.

    Moderator bcworkz

    (@bcworkz)

    Bob’s correct. Without the code to establish the custom taxonomy that was provided by the plugin, the DB entries are orphans in a sense. They exist, but you can’t do anything with them. To continue testing without the plugin activated, you would need some minimal code to establish the taxonomy (and post_type). Such code could be in your theme’s functions.php. You will need to delete it when you’re done testing and want to reactivate the plugin.

    If my set object terms solution in your other topic works out, you can stop testing and reactivate the plugin without worrying about interim code in functions.php.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Taxonomy doesn't exist’ is closed to new replies.