wordpress returning all the posts -


I only want to return the latest 2 posts but my code gives all posts, any ideas how to fix it Can i

Code below,

Thanks,

R.

  & lt ;? Php $ postslist = query_posts ('posts_per_page = 2'); Forex Currency ($ post as $ post): setup_postdata ($ post); ? & Gt; & Lt; Div class = "post" & gt; & Lt ;? Php the_date ('d / m / y', '
;); ? & Gt; & Lt ;? Php the_title ('& lt; div class = "title" & gt;', '& lt; / div & gt;'); ? & Gt; & Lt ;? Php the_excerpt (); ? & Gt; & Lt ;? Php Echo '& lt; A class = "reader" href = "'. Get_permalink ().' '& Gt;' .__ ('Read more & lt; span class =" meta-nav "& gt; & amp; raquo; & lt; / Span & gt; ',' twentyten ').' & Lt; / a & gt; '& gt; & lt; / div & gt; & lt ;? php endforeach;? & Gt;

Try:

  query_posts (array ('posts_per_page' = & Gt; 2));  

Comments