<!-- ******* ****** EMPIEZAN SIDEBAR CATEGORIES ***** ***** -->
<div id="sidebar-categories">
<?php
$current_cat = get_query_var('cat'); // category ID
$args = array('posts_per_page' => 8, 'cat' => $current_cat, 'order' => 'ASC', 'offset' => 3);
$custom_posts = get_posts($args);
foreach($custom_posts as $post) : setup_postdata($post);
endforeach;
?>
<!-- ******** ******* EMPIEZAN SIDEBAR NEWS ***** ******* -->
<div id="title-sidebar-categories"><?php printf( __( '%s' ), '<span>' . single_cat_title( '', false ) . '</span>' ); ?></div>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div id="date-sidebar-categories"><?php the_time('F jS, Y') ?></div>
<div id="title-sidebar-categories"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></div>
<div id="contents-sidebar-categories"><?php echo substr(get_the_excerpt(), 0,66); ?></div>
<?php endwhile;?>
<?php else : ?>
<h1>Nothing Found</h1>
<?php endif; wp_reset_query(); ?>
<!-- ******** ******* TERMINAN SIDEBAR NEWS ***** ******* -->
</div>
<!-- ******* ****** TERMINAN SIDEBAR CATEGORIES ***** ***** -->