• Hello all,
    I have a strange problem on my site whereby when I navigate to techpaladin.com/page/2/ (using the “older entries” link at the bottom of the page, usually), it displays the exact same content as the main page (what I assume would be “page 1”). I have a custom theme that I made, but I’m not terribly experienced with WordPress enough to figure out what it is I’m sure I’ve done wrong to precipitate this. Is this strange issue symptomatic of something obvious?

    Thanks!
    Nathaniel

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’m having this same issue. I am using custom permalinks. Anyone have any ideas why this is happening?

    thank you!

    I just spent some time finding the solution, so I thought I would update the open questions I found on this topic.

    See the codex:
    Pagination Parameters.

    I too have the /page/2/ problem in my custom theme in which just page 1’s content is displayed on page 1, 2, 3 and so on. I looked at the codex documentation and couldn’t figure out what would be the solution for this problem. I did try using:

    query_posts('category_name=Blog&posts_per_page=-1');

    which did indeed output all of my posts in the Blog category, but of course no pagination. My goal is to output 10 posts at a time and have the next pages link to the next older 10 posts in the same category, and so on.

    Here are the specifics of my issue:

    I am using a custom permalink structure in order to achieve my plan for my site:
    /%category%/%postname%/

    The way I am making my site is to have different pages use query_posts() to retrieve only posts from specific categories, one corresponding to each page. I also have a /blog/ page that will retrieve all posts categorized “blog”, and format them to look like blog posts.

    My original query was:
    query_posts('category_name=Blog&showposts=10');

    and that had the /page/2/ problem.

    I also tried:
    query_posts('category_name=Blog&posts_per_page=10');

    after reading the above linked (by alvarix) codex page, but that produced the same results. Does anyone have any ideas as to what I’m doing wrong? What other information can I provide to help you decipher my issue?

    I would love to know if someone has an answer because I had planned my website’s information design all around this concept of pages displaying only specifically categorized posts (and I figured the pagination would automatically work).

    This is where I originally researched the approach:
    http://wordpressgarage.com/code-snippets/display-posts-from-specific-categories-on-a-page/

    I have my /page/2/ etc. problem solved with this code:

    <?php
    if (have_posts()) {
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts("category_name=Blog&paged=$paged");
    }
    ?>

    replacing what I used to have:

    <?php query_posts('category_name=Blog&showposts=10'); ?>

    It was all explained in this post in the forum:
    http://wordpress.org/support/topic/57912

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘/page/2/ displaying page 1’s content’ is closed to new replies.