• i am newbie in wordpress. i am referring link for pagination and trying to put next and previous link to posts list. but i am not getting next and previous link in my page.

    What’s going wrong in my code?

    [please mark any posted code – http://codex.wordpress.org/Forum_Welcome#Posting_Code ]

    <?php get_header(); ?>
    
    <h2>Hi this is index file</h2>
    <h1> Post List</h1>
    <?php if(have_posts()): while (have_posts()) : the_post() ?>
    <h2> <?php the_title(); ?> </h2>
    <h3> <?php the_author(); ?> </h3>
    <?php the_content(); ?>
    <?php endwhile; ?>
    <div class="nav-previous alignleft"><?php posts_nav_link(); ?></div>
    
    <?php else :?>
    <?php _e("Sorry ! No post available"); ?>
    <?php endif;?>
    <?php posts_nav_link(); /////// ?>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    i think i kept posts_nav_link() in wrong place.

    Thanks in advance

Viewing 1 replies (of 1 total)
  • what template file is that?
    how many posts do you have?
    what is the setting under dashboard – settings – reading – blog pages show at most [ ] posts?

Viewing 1 replies (of 1 total)
  • The topic ‘Pagiantion problem (Not showing next and previous link)’ is closed to new replies.