You are doing so many things wrong there, for example, you should only use query_posts
once in a template file and on the main query of the page, anything else should be done using get_posts
or WP_Query
.
So to make you post types mingle you only need on query and you set the post type with an array:
<?php query_posts(array('posts_per_page' => 6, 'post_type' => array('work','post')));
if (have_posts()) :
while (have_posts()) : the_post(); ?>
<div class="postitem mall floatleft myblog storm_fader">
<div class="postitem-img lordfade">
<a href="<?php the_permalink() ?>"><?php the_post_thumbnail('type2'); ?></a>
</div>
<div class="postitem-contentwrap">
<div class="postitem-txt">
<h6><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h6>
<?php the_excerpt(''); ?>
</div>
<div class="postitem-info">
<ul>
<li><span class="postclass="<?php
if ($post->post_type =="post"){
echo 'post-label-blog"><blog';
}else{
echo 'post-label-work';
}?>"></span></li>
<li class="spec"><a href="<?php the_permalink() ?>">
<img src="/themachine_v4/wp-content/themes/themachine_v5_2/lib/imgs/img_gopost.jpg">
</a></li>
</ul>
<div class="clear"></div>
</div>
</div>
<div class="postitem-shadow"></div>
</div>
<?php endwhile;
else : ?>
<h2 class="center" style="color:#FFF;">ERROR</h2>
<?php endif; ?>