title: How can i display portfolio images in Wordpress?
body: <p>I've a sortable portfolio in my theme. And i want to display portfolio tags images in it. I find <a href="http://zahlan.net/blog/2012/06/categories-images/" rel="nofollow">this</a> plugin for this. But i couldn't customize it very well. </p>
  
  <p>Because i don't want to display posts' category images, i want to display portfolio's tags images in index. I think it will be clear with this <a href="http://i.stack.imgur.com/ClgEA.jpg" rel="nofollow">screenshot</a> I want to call this images, which you can see from the screenshot, in the index.</p>
  
  <p>Here are my theme codes:</p>
  
  <pre><code>&lt;?php
  
  $query = ff_get_query_for_section();
  if( !ff_archive_layout_type_test('portfolio', basename(__FILE__)) ){
      return false;
  }
  
  ff_require_portfolio_archive_helper_before();
  
  
  $numberOfPosts = ( $query-&gt;get('number-of-posts') ) ;
  
  ?&gt;
              &lt;!-- Filter Section --&gt;
              &lt;section &lt;?php ff_print_section_attributes($query-&gt;get('section-options-sortable section-options'), 'small-section'); //class="small-section bg-gray-lighter"?&gt;&gt;
                  &lt;div class="container relative"&gt;
                      &lt;!-- Works Filter --&gt;
                      &lt;div class="container align-center"&gt;
                          &lt;div class="works-filter  mb-0"&gt;
  
                          &lt;a href="#" class="filter active" data-filter="*"&gt;&lt;?php $query-&gt;printText('trans-all'); ?&gt;&lt;/a&gt;
  &lt;?php
  $portfolioTagsArray = array();
  $portfolioTagsString = '';
  $postCounter = 0;
  if ( have_posts() ) {
      while ( have_posts() ) {
          the_post();
          $postCounter++;
              $t = wp_get_post_terms( $post-&gt;ID, 'ff-portfolio-tag' );
              if( !empty($t) ) foreach ($t as $onePortfolioTag) {
  
                  if( !isset($portfolioTagsArray[ $onePortfolioTag-&gt;slug ]) ) {
                      $portfolioTagsString .= '&lt;a href="#" class="filter" data-filter=".tag-'.esc_attr($onePortfolioTag-&gt;term_id).'"&gt;'.ff_wp_kses( $onePortfolioTag-&gt;name ).'&lt;/a&gt;';
                  }
  
                  $portfolioTagsArray[ $onePortfolioTag-&gt;slug ] = $onePortfolioTag;
              }
              if( $numberOfPosts &gt; 0 &amp;&amp; $postCounter &gt;= $numberOfPosts ) {
                  break;
              }
  
          }
      }
  
      // Escaped HTML with tags
      echo $portfolioTagsString;
  
  ?&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                      &lt;!-- End Works Filter --&gt;
  
                  &lt;/div&gt;
              &lt;/section&gt;
              &lt;!--  End Filter Section --&gt;
  
  
              &lt;!-- Section --&gt;
              &lt;section &lt;?php ff_print_section_attributes($query-&gt;get('section-options'), 'page-section');//class="page-section" id="portfolio"?&gt;&gt;
                  &lt;div class="container relative"&gt;
  
                      &lt;!-- Works Grid --&gt;
                      &lt;ul class="works-grid work-grid-3 hover-color clearfix" id="work-grid"&gt;
  
   &lt;?php
   $fwc = ffContainer::getInstance();
   $postMeta = $fwc-&gt;getDataStorageFactory()-&gt;createDataStorageWPPostMetas();
      rewind_posts();
      $postCounter = 0;
      if ( have_posts() ) {
          while ( have_posts() ) {
              the_post();
              $postCounter++;
              $currentPostId = $post-&gt;ID;
  
              require dirname(__FILE__).'/portfolio-archive-one-post.php';
  
              if( $numberOfPosts &gt; 0 &amp;&amp; $postCounter &gt;= $numberOfPosts  ) {
                  break;
              }
          }
      }
  ?&gt;
                      &lt;/ul&gt;
                      &lt;!-- End Works Grid --&gt;
  
                      &lt;?php
                      if( $query-&gt;get('show-pagination') ) {
                          ff_bigstream_print_pagination();
                      }
                      ?&gt;
  
                  &lt;/div&gt;
              &lt;/section&gt;
  
              &lt;!-- End Section --&gt;
  &lt;?php
  ff_require_portfolio_archive_helper_after();
  </code></pre>
  
  <p>And i tried to add this codes in this file:</p>
  
  <pre><code>   &lt;?php foreach (wp_get_post_terms( $post-&gt;ID, 'ff-portfolio-tag' ) as $cat) : ?&gt;
  
  &lt;?php z_taxonomy_image($cat-&gt;term_id); ?&gt;
  &lt;a href="&lt;?php echo get_term_link($cat-&gt;term_id, 'ff-portfolio-tag'); ?&gt;"&gt;&lt;?php echo $cat-&gt;name; ?&gt;&lt;/a&gt;
  
  &lt;?php endforeach; ?&gt;
  </code></pre>
  
  <p>But i couldn't be successfull. If you help, i would be grateful. Thanks a lot.</p>