Ver Mensaje Individual
  #10 (permalink)  
Antiguo 09/08/2011, 08:21
blogdv
 
Fecha de Ingreso: julio-2010
Mensajes: 166
Antigüedad: 13 años, 9 meses
Puntos: 0
Respuesta: Mostrar entradas publicadas hoy en el index.. (?)

Cita:
Iniciado por Nekko Ver Mensaje
Necesitás reemplazar lo siguiente:
Código:
<?php if (have_posts()) : ?>
			
			<?php while (have_posts()) : the_post(); ?>
por esto
Código:
<?php $today = getdate();
$the_query = new WP_Query( 'year=' . $today["year"] . '&monthnum=' . $today["mon"] . '&day=' . $today["mday"] );
while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
Pero así como está si hoy no hay entradas, no te va a mostrar nada.

Para decirle qué debe mostrar, debés indicarlo después del endwhile.

http://codex.wordpress.org/The_Loop
Gracias pero reemplazando eso, al acceder al index.php de mi pagina me salta el siguiente error:
Parse error: syntax error, unexpected T_ELSE in /home/directorio/public_html/wp-content/themes/nombretheme/index.php on line 25