Ver Mensaje Individual
  #5 (permalink)  
Antiguo 01/07/2014, 19:42
Avatar de metacortex
metacortex
Viejo demente
 
Fecha de Ingreso: junio-2004
Ubicación: Caracas - Venezuela
Mensajes: 9.027
Antigüedad: 19 años, 11 meses
Puntos: 832
Respuesta: Mostrar las publicaciones de un wordpress en una página web

Suponiendo que tu blog se encuentre en el directorio /blog/

Código PHP:
Ver original
  1. <?php
  2. include 'blog/wp-load.php';
  3.  
  4. $consulta = new WP_Query('tus parámetros...');
  5.  
  6. if( $consulta->have_posts() ):
  7.     while( $consulta->have_posts() ):
  8.         $consulta->the_post();
  9. ?>
  10.         <h3><?php the_title() ?></h3>
  11.         <p><?php the_content() ?></p>
  12. <?php
  13.     endwhile;
  14.     wp_reset_postdata();
  15. else:
  16. ?>
  17.     <p>No hay entradas</p>
  18. <?php endif; ?>