title: Trouble getting taxonomy image with Taxonomy Meta plugin in Wordpress
body: <p>I am using the Taxonomy Meta plugin and have followed all instrauctions but feel like something is wrong with what I am doing. I just want to pull the image that is assigned to each category is a custom taxonomy and display it on a page template..</p>
  
  <p>the github repo of the plugin can be found here: <a href="https://github.com/rilwis/taxonomy-meta" rel="nofollow">https://github.com/rilwis/taxonomy-meta</a></p>
  
  <p>please help, I get everything to show but the image and when I look in the source the image path isnt there just an empty img tag.</p>
  
  <p>I can get an image to print using this:</p>
  
  <pre><code>$meta = get_option('additional');
      if (empty($meta)) $meta = array();
      if (!is_array($meta)) $meta = (array) $meta;
      $meta = isset($meta['5']) ? $meta['5'] : array();
      $images = $meta['community-image'];
  
          echo '&lt;ul&gt;';
      foreach ($images as $categories) {
      // get image's source based on size, can be 'thumbnail', 'medium', 'large', 'full' or registed post thumbnails sizes
      $src = wp_get_attachment_image_src($categories, 'thumbnail');
      $src = $src[0];
      $args=array(
          'orderby' =&gt; 'name',
          'order' =&gt; 'ASC',
          'taxonomy' =&gt; 'properties_community'
      );
  
      $categories=get_categories($args);
      // show image
      foreach($categories as $category) {
              echo '&lt;li&gt;&lt;a href="' . home_url() . '/?property_communities='. $category-&gt;slug .'" title="' . sprintf( __( "View all posts in %s" ), $category-&gt;name ) . '" ' . '&gt;&lt;img src="'.$src.'"/&gt;' . $category-&gt;name.'&lt;/a&gt; &lt;/li&gt; ';
          }
      }
      echo '&lt;/ul&gt;';
  </code></pre>
  
  <p>but I cannot figure out how to make it where the image matches the category being displayed.. I just put the number 5 in there to see if it worked which it does but if I try using $category->term_id it doesnt work and I am a bit lost from here..</p>
  
  <p><strong>UPDATE:</strong>
  I am now able to pull the images assigned to each category and print the names but I am getting this error "Warning: Invalid argument supplied for foreach() in /home/../themes/../my-template.php on line 39"</p>
  
  <p>Here is my code</p>
  
  <pre><code>$args = array( 'taxonomy' =&gt; 'properties_community' );
  
      $terms = get_terms('properties_community', $args);
  
      $count = count($terms); $i=0;
      if ($count &gt; 0) {
      $cape_list = '&lt;p class="my_term-archive"&gt;';
  
      foreach ($terms as $term) {
          $meta = get_option('additional');
      if (empty($meta)) $meta = array();
      if (!is_array($meta)) $meta = (array) $meta;
      $meta = isset($meta[$term-&gt;term_id]) ? $meta[$term-&gt;term_id] : array();
      $images = $meta['community-image'];
      foreach ($images as $att) {
      // get image's source based on size, can be 'thumbnail', 'medium', 'large', 'full' or registed post thumbnails sizes
      $src = wp_get_attachment_image_src($att, 'medium');
      $src = $src[0];
      // show image
  
      echo '&lt;a href="/term-base/' . $term-&gt;slug . '" title="' . sprintf(__('View all post filed under %s', 'my_localization_domain'), $term-&gt;name) . '"&gt;&lt;img src="'.$src.'" /&gt;' . $term-&gt;name . '&lt;/a&gt;';
  
      }}
      }
  </code></pre>
  
  <p>Anyone see why I may be getting this error?  I dont see anything wrong with the foreach :/</p>
  
  <p>Line 39 would be this: <code>foreach ($images as $att) {</code></p>