Ver Mensaje Individual
  #9 (permalink)  
Antiguo 18/06/2012, 07:08
Avatar de rogertm
rogertm
Mod->Cuba
 
Fecha de Ingreso: julio-2005
Ubicación: /home/Cuba/Habana/rogertm/
Mensajes: 2.922
Antigüedad: 18 años, 9 meses
Puntos: 638
Respuesta: Mostrar en el index las entradas publicadas hace 2 días

Según estoy viendo en el link que te pasé anteriormente, hay un ejemplo que es casi como el que puso @nekko, la única diferencia es que falta línea de remove_filter() al final y en lugar de query_posts usa $query = new WP_Query( $query_string ); entonces quedaría así:
Código PHP:
Ver original
  1. <?php
  2. function filter_where($where = '') {
  3. $where .= " post_date = '" . date('Y-m-d', strtotime('-2 days')) . "'";
  4. return $where;
  5. }
  6. add_filter('posts_where', 'filter_where');
  7. $query = new WP_Query( $query_string );
  8. remove_filter( 'posts_where', 'filter_where' );
  9. ?>
Lo otro que pueda estar pasando es que no tengas posts de hace dos días . Igual hecha un vistazo aquí http://php.net/strtotime

Lo otro es que ese código debes ponerlo en el archivo functios.php de tu theme...

Saludos.
__________________
Friki y Blogger por Cuenta Propia:213
Twenty'em: Theming is Prose