dilluns, 11 de gener del 2010

3 últims apunts de WordPress en una web amb PHP

Display the last three posts on your web page.

// Get the last 3 posts.  <?php  require('/the/path/to/your/wp-blog-header.php');  ?>    <?php query_posts('showposts=3'); ?>  <?php while (have_posts()) : the_post(); ?>  <br />    <?php endwhile;?>  

Jo no faig res d'includes, faig un echo file_get_contents d'un fitxer que llista els últims posts.

Posted via web from jrosell's posterous

Cap comentari:

Publica un comentari a l'entrada