Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6567609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:21:29+00:00 2026-05-25T14:21:29+00:00

I created a new template in WordPress to show the latest articles. After, I

  • 0

I created a new template in WordPress to show the latest articles. After, I will sort them in other ways. My problem is I can not use the pagination correctly.

The next page and previous page are working ok, but the posts are not changed. The first three are the only that are shown.

Can you give me a clue about this ?

<?php
/*
Template Name: Latest Prizes
*/
get_header(); 


// The Query
query_posts( 'posts_per_page=3' );

// The Loop
while ( have_posts() ) : the_post();
    echo '<li>';
    the_title();
    echo '</li>';
endwhile;

posts_nav_link(' &#183; ', 'previous page', 'next page');


// Reset Query
wp_reset_query();


get_footer(); ?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T14:21:30+00:00Added an answer on May 25, 2026 at 2:21 pm

    From the WordPress Codex on query_posts():

    …

    For example, on the homepage, you would normally see the latest 10 posts. If you want to show only 5 posts (and don’t care about pagination), you can use query_posts() like so:

    query_posts( 'posts_per_page=5' );

    Change your query_posts() to this:

    query_posts(array('posts_per_page' => 3, 'paged' => get_query_var('page')));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've created a new Pylons application and added a controller (main.py) with a template
I'm new to wordpress development and created a widget that works fine, however I'm
I've created a custom post type in WordPress, and in the single post template,
I recently created a new template page, I put the obligatory <?php /* Template
I'm testing a new template for a wordpress based site, and I'd like to
I created new web project using VS 2008 with enabled Ajax template with C#
I have created a new ASP.NET MVC project using the MVC Project Template. According
I have created a simple WordPress page template. I am working on live server.
I am using wordpress and I've created a new table in the wordpress database.
I am rather new to Wordpress and have a question. I have created my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.