title: Wordpress Posts in each category in different DIVs
body: <p>I'm having a wordpress problem. I'm trying to get three divs that toggle visibility when a user clicks a link. My problem is that all the results from each WP_Query are under the <code>HomeDisplaySel</code> div. I've counted where each div begins and end, and even added extra end divs, but nothing works. I cant separate each post category into different divs. Thanks for the help. </p>
  
  <pre><code>&lt;div id="HomeDisplaySel"&gt;
      &lt;?php $AllPostsArgs = array ('posts_per_page' =&gt; 6, 'category' =&gt; 'posts'); ?&gt;
      &lt;?php $AllPosts = new WP_Query($AllPostsArgs); ?&gt;
      &lt;?php while($AllPosts-&gt;have_posts()) : $AllPosts-&gt;the_post(); ?&gt;
      &lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;h1&gt;&lt;?php the_title(); ?&gt;&lt;/h1&gt;&lt;/a&gt;
      &lt;div id="Author"&gt;
      &lt;?php $authID = get_the_author_meta('ID'); ?&gt;
      &lt;?php echo get_avatar($authID); ?&gt;
      &lt;h5&gt;&lt;?php the_author();?&gt;&lt;/h5&gt;&lt;br /&gt;
      &lt;h5&gt;&lt;?php the_author_meta('user_description'); ?&gt;&lt;/h5&gt;
      &lt;/div&gt;
      &lt;h4&gt;Posted on &lt;?php the_time('F jS, Y') ?&gt;&lt;/h4&gt;
      &lt;br /&gt;
      &lt;p&gt;&lt;?php the_excerpt(__('(more...)')); ?&gt;&lt;/p&gt;
      &lt;hr&gt;
      &lt;?php endwhile; ?&gt;
  &lt;/div&gt;
  
  &lt;div id="WKTSel"&gt;
      &lt;?php $AllPostsArgs = array ('posts_per_page' =&gt; 6, 'category' =&gt; 'workouts'); ?&gt;
      &lt;?php $WKTS = new WP_Query("posts_per_page=6&amp;category=workouts"); ?&gt;
      &lt;?php while($WKTS-&gt;have_posts()) : $$WKTS-&gt;the_post(); ?&gt;
      &lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;h1&gt;&lt;?php the_title(); ?&gt;&lt;/h1&gt;&lt;/a&gt;
      &lt;h4&gt;Posted on &lt;?php the_time('F jS, Y') ?&gt;&lt;/h4&gt;
      &lt;br /&gt;
      &lt;p&gt;&lt;?php the_excerpt(__('(more...)')); ?&gt;&lt;/p&gt;
      &lt;hr&gt;
      &lt;?php endwhile; ?&gt;
  &lt;/div&gt;
  
  &lt;div id="THPYSel"&gt;
      &lt;?php $AllPostsArgs = array ('posts_per_page' =&gt; 6, 'category' =&gt; 'therapy'); ?&gt;
      &lt;?php $WKTS = new WP_Query("posts_per_page=6&amp;category=workouts"); ?&gt;
      &lt;?php while($WKTS-&gt;have_posts()) : $$WKTS-&gt;the_post(); ?&gt;
      &lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;h1&gt;&lt;?php the_title(); ?&gt;&lt;/h1&gt;&lt;/a&gt;
      &lt;h4&gt;Posted on &lt;?php the_time('F jS, Y') ?&gt;&lt;/h4&gt;
      &lt;br /&gt;
      &lt;p&gt;&lt;?php the_excerpt(__('(more...)')); ?&gt;&lt;/p&gt;
      &lt;hr&gt;
      &lt;?php endwhile; ?&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>EDIT</p>
  
  <p>When I go to view the source in chrome, heres what I see.</p>
  
  <pre><code>&lt;!-- Home Page --&gt;
  
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta name="viewport" content="width=device-width" /&gt;
  &lt;title&gt; | The MindStream Academy Blog&lt;/title&gt;
  &lt;link href='http://fonts.googleapis.com/css?family=Monda' rel='stylesheet' type='text/css'&gt;
  &lt;link rel="stylesheet" href="http://localhost:8888/MindstreamBlog/wp-content/themes/mindstream/style.css" /&gt;
  &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="changehome.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div id="wrapper"&gt;
  &lt;div id="header"&gt;
  &lt;img src="http://localhost:8888/MindstreamBlog/wp-content/uploads/2013/01/logo.png" alt="MindStream_Academy_Logo" id="logo" /&gt;
  &lt;/div&gt;&lt;div id="sidebar"&gt;
  &lt;li class="page_item page-item-8"&gt;&lt;a href="http://localhost:8888/MindstreamBlog/?page_id=8"&gt;Home&lt;/a&gt;&lt;/li&gt;
  &lt;li class="page_item page-item-9"&gt;&lt;a href="http://localhost:8888/MindstreamBlog/?page_id=9"&gt;About&lt;/a&gt;&lt;/li&gt;
  &lt;li class="page_item page-item-11"&gt;&lt;a href="http://localhost:8888/MindstreamBlog/?page_id=11"&gt;Students&lt;/a&gt;&lt;/li&gt;
  &lt;li class="page_item page-item-14"&gt;&lt;a href="http://localhost:8888/MindstreamBlog/?page_id=14"&gt;Archives&lt;/a&gt;&lt;/li&gt;
  &lt;li class="page_item page-item-13"&gt;&lt;a href="http://localhost:8888/MindstreamBlog/?page_id=13"&gt;Fan Mail&lt;/a&gt;&lt;/li&gt;
  &lt;li class="page_item page-item-16"&gt;&lt;a href="http://localhost:8888/MindstreamBlog/?page_id=16"&gt;Contact&lt;/a&gt;&lt;/li&gt;
  &lt;/div&gt;&lt;div id="main"&gt;
  &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="changehome.js"&gt;&lt;/script&gt;
  &lt;div class="col"&gt;
  &lt;div class="ChangeHome"&gt;
  &lt;h2&gt;&lt;a href='#' id='LoadRP'&gt;Recent&lt;br /&gt;Posts&lt;/a&gt;&lt;/h2&gt;
  &lt;/div&gt;
  &lt;div class="ChangeHome"&gt;
  &lt;h2&gt;&lt;a href='#' id='LoadWOTW'&gt;Workout of&lt;br /&gt;the Week&lt;/a&gt;&lt;/h2&gt;
  &lt;/div&gt;
  &lt;div class="ChangeHome"&gt;
  &lt;h2&gt;&lt;a href='#' id='LoadWT'&gt;Weekly Therapy&lt;/a&gt;&lt;/h2&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div id="HomeDisplaySel"&gt;
                  &lt;a href="http://localhost:8888/MindstreamBlog/?p=43"&gt;&lt;h1&gt;Workout #1&lt;/h1&gt;&lt;/a&gt;
      &lt;div id="Author"&gt;
          &lt;img width="96" height="96" src="http://localhost:8888/MindstreamBlog/wp-content/uploads/2013/01/Ian-clarke-headshot-1-150x150.png" class="avatar avatar-96 photo wp-post-image" alt="" /&gt;  &lt;h5&gt;Hunter Willis&lt;/h5&gt;&lt;br /&gt;
      &lt;h5&gt;2012 Fall &amp;amp; Spring&lt;/h5&gt;
      &lt;/div&gt;
      &lt;h4&gt;Posted on February 16th, 2013&lt;/h4&gt;
      &lt;br /&gt;
      &lt;p&gt;&lt;p&gt;Hey all. How is everyone? Pumped? I know I am! Here is a workout for your arms and core to [...]&lt;/p&gt;
  &lt;/p&gt;
      &lt;hr&gt;
          &lt;a href="http://localhost:8888/MindstreamBlog/?p=36"&gt;&lt;h1&gt;Test 3&lt;/h1&gt;&lt;/a&gt;
      &lt;div id="Author"&gt;
          &lt;img width="96" height="96" src="http://localhost:8888/MindstreamBlog/wp-content/uploads/2013/01/Ian-clarke-headshot-1-150x150.png" class="avatar avatar-96 photo wp-post-image" alt="" /&gt;  &lt;h5&gt;Hunter Willis&lt;/h5&gt;&lt;br /&gt;
      &lt;h5&gt;2012 Fall &amp;amp; Spring&lt;/h5&gt;
      &lt;/div&gt;
      &lt;h4&gt;Posted on February 6th, 2013&lt;/h4&gt;
      &lt;br /&gt;
      &lt;p&gt;&lt;p&gt;Test test testeroo! Test test testeroo! Test test testeroo! Test test testeroo! Test test testeroo! Test test testeroo! Test test testeroo! Test test testeroo! Test test testeroo! Test test [...]&lt;/p&gt;
  &lt;/p&gt;
      &lt;hr&gt;
          &lt;a href="http://localhost:8888/MindstreamBlog/?p=33"&gt;&lt;h1&gt;Test 2&lt;/h1&gt;&lt;/a&gt;
      &lt;div id="Author"&gt;
          &lt;img width="96" height="96" src="http://localhost:8888/MindstreamBlog/wp-content/uploads/2013/01/Ian-clarke-headshot-1-150x150.png" class="avatar avatar-96 photo wp-post-image" alt="" /&gt;  &lt;h5&gt;Hunter Willis&lt;/h5&gt;&lt;br /&gt;
      &lt;h5&gt;2012 Fall &amp;amp; Spring&lt;/h5&gt;
      &lt;/div&gt;
      &lt;h4&gt;Posted on February 6th, 2013&lt;/h4&gt;
      &lt;br /&gt;
      &lt;p&gt;&lt;p&gt;Test test testeroo! Test test testeroo! Test test testeroo! Test test testeroo! Test test testeroo! Test test testeroo! Test test testeroo! Test test testeroo! Test test testeroo! Test test [...]&lt;/p&gt;
  &lt;/p&gt;
      &lt;hr&gt;
          &lt;a href="http://localhost:8888/MindstreamBlog/?p=26"&gt;&lt;h1&gt;Test&lt;/h1&gt;&lt;/a&gt;
      &lt;div id="Author"&gt;
          &lt;img width="96" height="96" src="http://localhost:8888/MindstreamBlog/wp-content/uploads/2013/01/Ian-clarke-headshot-1-150x150.png" class="avatar avatar-96 photo wp-post-image" alt="" /&gt;  &lt;h5&gt;Hunter Willis&lt;/h5&gt;&lt;br /&gt;
      &lt;h5&gt;2012 Fall &amp;amp; Spring&lt;/h5&gt;
      &lt;/div&gt;
      &lt;h4&gt;Posted on January 25th, 2013&lt;/h4&gt;
      &lt;br /&gt;
      &lt;p&gt;&lt;p&gt;Test test testeroo! Test test testeroo! Test test testeroo! Test test testeroo! Test test testeroo! Test test testeroo! Test test testeroo! Test test testeroo! Test test testeroo! Test test [...]&lt;/p&gt;
  &lt;/p&gt;
      &lt;hr&gt;
      &lt;/div&gt;
  
  &lt;div id="WKTSel"&gt;
  </code></pre>