• When I put the following in my theme:

    <?php $type_images = get_option( 'taxonomy_image_plugin' );
    echo '<pre>';
    var_dump( $type_images );
    echo '</pre>'; ?>

    I get the output:

    array(3) {
      [41]=>
      int(200)
      [42]=>
      int(201)
      [44]=>
      int(202)
    }

    I’m confused because the IDs in this array (41,41,44) are wrong by 1. There are three terms on the site with images (40,41,43) associated with images (those image IDs are right).

    Is this the expected behavior? I can resolve the problem by subtracting one from each ID, but that makes me nervous!

    http://wordpress.org/extend/plugins/taxonomy-images/

Viewing 2 replies - 1 through 2 (of 2 total)
  • I am also facing the same problem and getting wrong id by 2 i.e if the ID is 55, i am getting getting o/p 57

    Plugin Contributor Michael Fields

    (@mfields)

    The Taxonomy Images plugin will store term_taxonomy_id as the key of the array. I decided not to use term_id for a very important reason: A lot of term data is shared between terms with the same name that appear in different taxonomies. I believe this may be what you are experiencing here.

    Please compare the key in the options array to the term_taxonomy_id of the term after var dumping get_terms(). If they match, the plugin is functioning correctly – if not, there may be a bug.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Taxonomy Images] get_option( 'taxonomy_image_plugin' ) returns IDs off by one’ is closed to new replies.