It looks to me like the problem is that you are still using the base query.
You can change this by adding your variable $my_query2
in the code like this:
<?php if ($my_query2->have_posts()) : ?><?php while ($my_query2->have_posts()) : $my_query2->the_post(); ?>
This will make all the functions like the_title()
, the_content()
, etc work as intended since they will be set to $my_query2
.