WordPress.org

Ready to get started?Download WordPress

Forums

pagination not working on my front page .. please help (1 post)

  1. japer
    Member
    Posted 3 years ago #

    pagination not working on my front page .. please help

    http://www.myweb.com/page/2/ (not)
    http://www.myweb.com/tipos/1-alcoba/ (yes)

    I'm using this code to front page ...

    <?php get_header(); ?>
    <div id="main_inicio" >                   
    
    <?php
      $type = 'amoblados';
      $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
      $args=array(
        'post_type' => $type,
        'post_status' => 'publish',
        'paged' => $paged,
        'posts_per_page' => 4,
        'caller_get_posts'=> 1
      );
      $temp = $wp_query;  // assign original query to temp variable for later use
      $wp_query = null;
      $wp_query = new WP_Query();
      $wp_query->query($args);
    ?>
    <?php if($wp_query->have_posts()) : while($wp_query->have_posts()) : $wp_query->the_post(); ?>
    
        .........
    
    <?php endwhile; ?>
    
    <div id="paginacion">
    <?php wp_pagenavi(); ?>
    </div><!-- #nav-below -->
    
    <?php endif; ?>

Topic Closed

This topic has been closed to new replies.

About this Topic