$myposts = get_posts( array(
'category' => 6,
'numberposts' => 8,
'order' => 'ASC',
) );
foreach( $myposts as $post ){
setup_postdata( $post );
?>
<li class="notes__item">
<a href="<?php echo get_permalink();?>"
><?php echo get_the_title();?></a>
</li>
<?php
}
wp_reset_postdata();
?>