title: Loops for cat links not looping for wordpress site
body: <p>I have this code and all the vars pull in but the latest news is not showing up. any ideas?</p>
  
  <p></p>
  
  <pre><code>&lt;div class="content"&gt;
      &lt;?php get_sidebar('field'); ?&gt;
      &lt;?php
      global $current_user;
      get_currentuserinfo();
      $user_info = get_userdata($current_user-&gt;ID);
  
      if ( have_posts() &amp;&amp; $user_info-&gt;user_level != 0) : while ( have_posts() ) : the_post(); ?&gt;
  
      &lt;?php // get custom fields
      $wt_email = get_post_meta($post-&gt;ID, 'wt_email', true);
      $wt_feed = get_post_meta($post-&gt;ID, 'wt_website', true);
      $wt_facebook = get_post_meta($post-&gt;ID, 'wt_facebook', true);
      $wt_twitter = get_post_meta($post-&gt;ID, 'wt_twitter', true);
      $wt_linkedin = get_post_meta($post-&gt;ID, 'wt_linkedin', true);
      ?&gt;
  
      &lt;div class="entry"&gt;
      &lt;h1&gt;&lt;?php the_title(); ?&gt;&lt;/h1&gt;
      &lt;div class="body"&gt;
      &lt;?php the_content(); ?&gt;
      &lt;/div&gt;
      &lt;div class="share"&gt;
          &lt;div class="links"&gt;
              &lt;h3&gt;Links&lt;/h3&gt;
              &lt;ul&gt;
                  &lt;?php if($wt_twitter) { ?&gt;&lt;li&gt;&lt;a href="http://&lt;?php print $wt_twitter; ?&gt;"&gt;Twitter&lt;/a&gt;&lt;/li&gt;&lt;?php } ?&gt;
                  &lt;?php if($wt_facebook) { ?&gt;&lt;li&gt;&lt;a href="http://&lt;?php print $wt_facebook; ?&gt;"&gt;Facebook&lt;/a&gt;&lt;/li&gt;&lt;?php } ?&gt;
                  &lt;?php if($wt_email) { ?&gt;&lt;li&gt;&lt;a href="mailto:&lt;?php print $wt_email; ?&gt;"&gt;Email&lt;/a&gt;&lt;/li&gt;&lt;?php } ?&gt;
                  &lt;?php if($wt_linkedin) { ?&gt;&lt;li&gt;&lt;a href="http://&lt;?php print $wt_linkedin; ?&gt;"&gt;Website&lt;/a&gt;&lt;/li&gt;&lt;?php } ?&gt;
              &lt;/ul&gt;
              &lt;/div&gt;
  &lt;?php endwhile; // End the loop. Whew. ?&gt;
          &lt;div class="news"&gt;
              &lt;h3&gt;Latest News&lt;/h3&gt;
              &lt;ul&gt;
                  &lt;?php
                  // The Query
                  $loop = new WP_Query( array( 
                      'category_name' =&gt; $wt_feed, 
                      'order' =&gt; 'ASC', 
                      'posts_per_page'=&gt; 5
                  ) );
  
                  // The Loop
                  if( $loop-&gt;have_posts() ) : while ( $loop-&gt;have_posts() ) : $loop-&gt;the_post();
                      echo '&lt;li&gt;&lt;a href="' . the_permalink() . '"&gt;';
                          the_title(); 
                      echo '&lt;/a&gt;&lt;/li&gt;';
                  endwhile;
                  endif;
  
                  // Reset Query
                  wp_reset_query();
                  ?&gt;
              &lt;/ul&gt;
              &lt;?php 
              $args=array(
                'category_name'       =&gt; $wt_feed,
                'type'                =&gt; 'post'
                );
              $categories=get_categories($args);
  
              if($wt_feed) { ?&gt;&lt;a href="/&lt;?php print $categories-&gt;slug; ?&gt;/feed" class="subscribe"&gt;Subscribe&lt;/a&gt;&lt;?php } ?&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;?php else : ?&gt;
      &lt;div class="entry"&gt;
      &lt;h1&gt;Listing Private&lt;/h1&gt;
      &lt;div class="body"&gt;
      &lt;p&gt;You need to have a Member account view the details of this list. Request an account membership.&lt;/p&gt;
      &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;?php endif; ?&gt;
  
  &lt;div class="clearfix"&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p></p>