title: Wordpress loop inside of Bootstrap Tabs
body: <p>I'm trying to have a loop call in side of a tab in a tab group. The tabs are from bootstrap, and the only thing is that when the page first loads, the loop doesn't, you have to click on a tab to load up the content. Is there any way to make sure the loop is load on page load?</p>
  
  <p>For context, this a library site, and the content are new books/music/movies listed out with an image left justified and title/author on the right.</p>
  
  <p>Here is the code that I'm using.</p>
  
  <pre><code> &lt;div class="span4 pull-right"&gt;
      &lt;h2 style="font-weight:200;"&gt;New At The Library&lt;/h2&gt;
  &lt;ul class="nav nav-tabs" id="myTab"&gt;
    &lt;li class="active"&gt;&lt;a href="#books" data-toggle="tab"&gt;&lt;h5 style="margin:0;"&gt;&lt;i class="icon-book"&gt;&lt;/i&gt;  New Books&lt;/h5&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#cds" data-toggle="tab"&gt;&lt;h5 style="margin:0;"&gt;&lt;i class="icon-music"&gt;&lt;/i&gt;  New Music&lt;/h5&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#movies" data-toggle="tab"&gt;&lt;h5 style="margin:0;"&gt;&lt;i class="icon-film"&gt;&lt;/i&gt;  New Films&lt;/h5&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  &lt;div class="tab-content"&gt;
  &lt;div class="tab-pane" id="books"&gt;
  &lt;?php query_posts( array ( 'category_name' =&gt; 'new-books', 'posts_per_page' =&gt; -3 ) ); ?&gt;
  
  &lt;?php while ( have_posts() ) : the_post();?&gt;
      &lt;ul class="unstyled"&gt;
          &lt;li class="clearfix"&gt;
              &lt;?php echo get_the_post_thumbnail($page-&gt;ID, $arraySIZE = array('' =&gt; 120,80 ), array('class' =&gt; 'img-polaroid')); ?&gt;
              &amp;nbsp;
              &lt;h4 class="pull-right" style="margin:0;"&gt;&lt;?php the_content();?&gt;&lt;/h4&gt;
          &lt;/li&gt;
              &lt;hr&gt;
      &lt;/ul&gt;
  &lt;?php endwhile; ?&gt;
  
  &lt;/div&gt;
  
  
  &lt;div class="tab-pane" id="cds"&gt;
  &lt;?php query_posts( array ( 'category_name' =&gt; 'new-music', 'posts_per_page' =&gt; -3 ) ); ?&gt;
  
  &lt;?php while ( have_posts() ) : the_post();?&gt;
      &lt;ul class="unstyled"&gt;
          &lt;li class="clearfix"&gt;
              &lt;?php echo get_the_post_thumbnail($page-&gt;ID, $arraySIZE = array('' =&gt; 80,80 ), array('class' =&gt; 'img-polaroid')); ?&gt;
              &amp;nbsp;
              &lt;h4 class="pull-right" style="margin:0;"&gt;&lt;?php the_content();?&gt;&lt;/h4&gt;
          &lt;/li&gt;
              &lt;hr&gt;
      &lt;/ul&gt;
  &lt;?php endwhile; ?&gt;
  
  &lt;/div&gt;
  &lt;div class="tab-pane" id="movies"&gt;
  
  &lt;?php query_posts( array ( 'category_name' =&gt; 'new-movies', 'posts_per_page' =&gt; -3 ) ); ?&gt;
  
  &lt;?php while ( have_posts() ) : the_post();?&gt;
      &lt;ul class="unstyled"&gt;
          &lt;li class="clearfix"&gt;
              &lt;?php echo get_the_post_thumbnail($page-&gt;ID, $arraySIZE = array('' =&gt; 120,80 ), array('class' =&gt; 'img-polaroid')); ?&gt;
              &amp;nbsp;
              &lt;h4 class="pull-right" style="margin:0;"&gt;&lt;?php the_content();?&gt;&lt;/h4&gt;
          &lt;/li&gt;
              &lt;hr&gt;
      &lt;/ul&gt;
  &lt;?php endwhile; ?&gt;
  
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>