________________________________________

THIS CODE WORKS FOR ATTACHING AN ARRAY OF POSTS TO A PAGE/ SPECIFIED BY TEMPLATE SELECTION

<?php get_header(); ?>
<?php /* Template Name: test */?>
<!– CONTENT –>
<div id=”content-wrapper”>
<div id=”content”>
<h1><?php the_title(); ?></h1>
<?php global $dlPageId; $dlPageId = null;    ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php $dlPageId = $post->ID; ?>
<?php the_content(); ?>
<center><div style=”clear: both;”><?php edit_post_link(__(‘Edit this page’,'emerald_stretch’), ‘<p>’, ‘</p>’); ?></div></center>

<ul>
<?php
global $post;
$args = array( ‘numberposts’ => 5, ‘offset’=> 0, ‘category_name’ => ‘uncategorized’, ‘orderby’ => ‘post_date’, ‘order’ => ‘ASC’);
$myposts = get_posts( $args );
foreach( $myposts as $post ) :    setup_postdata($post); ?>
<li><a href=”<?php the_permalink(); ?>”><h1><?php the_title(); ?></h1></a>
<p><?php the_excerpt(); ?>       <br/>
<a href=”<?php the_permalink() ?>” rel=”bookmark” title=”… read more”>…read more</a>
</li>
<?php endforeach; ?>
</ul>

<?php endwhile; endif; ?>

</div>
<!– /CONTENT –>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

_______________________________________________________

PARAMETERS:

<?php $args = array(
‘numberposts’     => 5,
‘offset’          => 0,
‘category’        => ,
‘orderby’         => ‘post_date’,
‘order’           => ‘DESC’,
‘include’         => ,
‘exclude’         => ,
‘meta_key’        => ,
‘meta_value’      => ,
‘post_type’       => ‘post’,
‘post_mime_type’  => ,
‘post_parent’     => ,
‘post_status’     => ‘publish’ ); ?>