Mismas entradas Wordpress en varias páginas
Hola a todos. Éste es mi primer mensaje en el foro.
Actualmente estoy haciendo una web-blog con wordpress, tiene cinco páginas, y necesito que en todas ellas aparezcan las entradas. Las mismas que en la página de inicio.
He probado a repetir el loop del archivo index.php.
<?php //Cambiar "cat=5" al ID de la categoría que quieras destacar. Asegúrate también de cambiarlo debajo, en la segunda petición.
$my_query = new WP_Query('showposts=2&cat=5');
while ($my_query->have_posts()) : $my_query->the_post();
$do_not_duplicate = $post->ID; ?>
<?php the_time('j n y') ?><?php the_title(); ?><?php the_content('Read the rest of this entry »'); ?><?php if ('open' == $post->comment_status) : ?><?php comments_number('Make A Comment', '1 Comment', '% Comments'); ?><?php else : ?>
Comments Closed
<?php endif; ?><?php edit_post_link('Edit', ' | ', ''); ?><?php endwhile; ?><?php if ( have_posts() ) :
while ( have_posts() ) : the_post();
if (in_category('5')) continue;
if (in_category('6')) continue;
elseif ( $post->ID == $do_not_duplicate ) continue;
update_post_caches($posts); ?>
<?php the_title(); ?><?php if(function_exists('the_ratings')) { the_ratings(); } ?><?php endwhile; ?><?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?><?php endif; ?>
Al crear una página nueva y aplicarle la plantilla nueva con el loop y todo, tan sólo me hace la primera petición, pero no la segunda.
Lo podéis ver aquí (haced click en "anúnciate")
Si pudiérais ayudarme estaría enormemente agradecido.
Gracias !
Santiago