Ver Mensaje Individual
  #1 (permalink)  
Antiguo 03/02/2011, 12:54
Avatar de AlZuwaga
AlZuwaga
Colaborador
 
Fecha de Ingreso: febrero-2001
Ubicación: 34.517 S, 58.500 O
Mensajes: 14.550
Antigüedad: 23 años, 2 meses
Puntos: 535
paginación mala (query_posts, page template, etc)

Hola, tengo en mi theme definido que la página inicial muestre una página estática.
Digamos que esta página estática se llama "inicio" y la cargo con el template page-inicio.php

En ese archivo, page-inicio.php, tengo colocado el siguiente código:

Código PHP:
<?php
/**
 * The template for displaying all pages.
 *
 * This is the template that displays all pages by default.
 * Please note that this is the wordpress construct of pages
 * and that other 'pages' on your wordpress site will use a
 * different template.
 *
 * @package WordPress
 * @subpackage Starkers
 * @since Starkers 3.0
 */

get_header(); ?>

<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>

                    <?php if ( is_front_page() ) { ?>
                        <h2><?php the_title(); ?></h2>
                    <?php } else { ?>    
                        <h1><?php the_title(); ?></h1>
                    <?php ?>                

                        <?php the_content(); ?>
                        <?php wp_link_pages( array( 'before' => '' __'Pages:''twentyten' ), 'after' => '' ) ); ?>
                        <?php edit_post_link__'Edit''twentyten' ), '''' ); ?>

                <?php // comments_template( '', true ); ?>

<?php endwhile; ?>


<hr class="hr_sep" />
<!-- Inicio de POSTS -->
<?php query_posts('posts_per_page=5&cat=-4'); ?>

<h3 class="subtitulo">Entradas recientes</h3>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                
    <div class="post">
    <h3><a href="<?php the_permalink(); ?>" title="<?php printfesc_attr__'Enlace permanente a %s''twentyten' ), the_title_attribute'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h3>
            
            
            <?php
            
if($post->post_excerpt) :
                
the_excerpt();
            else :
                
the_content("Continuar leyendo");
            endif
            
?>




            <div class="meta">
            <?php twentyten_posted_on(); ?>
            
                <?php if ( countget_the_category() ) ) : ?>
                    <?php printf__'en %2$s''twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links'get_the_category_list', ' ) ); ?>
                <?php endif; ?>

                <?php if (comments_open()) :
                
comments_popup_link__'Dejar un comentario''twentyten' ), __'1 comentario''twentyten' ), __'% comentarios''twentyten' ) );
                endif; 
?>

                <?php edit_post_link__'(Editar)''twentyten' ), '''' ); ?>
             </div><!-- endof .meta -->

        <?php comments_template''true ); ?>
    </div><!-- endof .post -->
                

    <?php endwhile; ?>

    <div class="navigation">
      <div class="nav-alignleft"><?php next_posts_link('Entradas antiguas'?></div>
      <div class="nav-alignright"><?php previous_posts_link('Entradas recientes'?></div>
    </div>

    <?php endif; ?>
    <?php wp_reset_query(); ?>
<!-- Fin de POSTS -->


<?php get_footer(); ?>
El enlace de entradas recientes me lleva a http://localhost/page/2/, pero allí me sigue mostrando las entradas de la primer página. Y una vez en la segunda, mostrándome las entradas de la primera, el enlace sigue apuntando a la página 2!

Vi soluciones como la de metacortex, la del foro de wordpress (que es lo mismo que la de metacortex) y cientos de otros ejemplos similares o idénticos: ninguno funcionó.

Alguna idea? Me está volviendo loco
__________________
...___...