Slide in Panel WordPress Post

The reason why your query fails is the following.
You are finishing the loop before your cd-panel with

<?php  endwhile; wp_reset_postdata(); ?>

which is correct. However, after that you are simply using

<?php the_title(); ?>, <?php the_content(); ?>

which is just a single template tag, and in your case, outputs the title of the first post of the last category you’ve queried.

The solution:

  • You have to load the post content’s via a wp ajax call (on click on that accordeon tab), or

  • open up another loop before the cd-panel, get all posts and hide/show them with css

The second is more load heavy, but not that complicated.