<?php /* The loop */ ?>
<?php query_posts(array('tag__not_in' => array(10))); ?>
<?php $count = 0 ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', get_post_format() ); ?>
<?php $count++ ?>
<?php endwhile; ?>
<?php
$args = array(
'showposts' => 2
,'tag' => 'status'
,'offset'=> (2*$count)
);
$query = new WP_Query( $args );
// Цикл
if ( $query->have_posts() ) {
while ( $query->have_posts() )
{
$query->the_post();
echo '<li>' . get_the_title() . '</li>';
}
} else {
// Постов не найдено
}
?>
<script type="text/javascript">
<!-- //
var last_change = null;
var last_color = null;
function ChangeColor( element, color ){
if( last_change != null ){
last_change.style.backgroundColor = last_color;
}
last_change = element;
last_color = element.style.backgroundColor;
element.style.backgroundColor = color;
}
// -->
</script>