[resolved] Pagination issues with a custom Page template (6 posts)

  1. volfro
    Posted 7 years ago #

    Hey everybody,

    I'm having an issue with pagination on a custom Page template. using posts_nav_link produces previous and next links on the page, but they don't actually lead anywhere: they go to thesite.com/index.php/page/x instead of thesite.com/index.php/pagename/page/x.

    The links they're producing always lead to a 404, obviously.

    I'm using the method for pagination and query_posts found at this thread, but and I'm not sure where I'm going wrong.

    Here's the pastebin of my template file, and a link to the actual working site.

    Please help me figure out what's wrong here that's keeping my pagination nav links from working properly. This functionality is being used in several places on the site.

    It should be noted that pagination does work. If I manually type the proper paginated address, it works perfectly; it's just the previous/next links that don't.

    Thanks everybody!

  2. moshu
    Posted 7 years ago #

    I guess you misunderstood the idea of the code in the topic you linked to.
    Now, instead of getting technical - decsribe WHAT do you want to achieve? What is the end goal?
    (Don't tell me HOW you want to do it, since you don't know; just explain in plain English your goal)

  3. volfro
    Posted 7 years ago #

    Sorry, I wasn't clear enough:

    I want this page template to function as an index for a certain category (in this case, BFA Posts) with pagination using query_posts.

    As it stands, WP creates the pages appropriately, but the pagination links themselves don't actually lead anywhere. Instead of creating links that go to thesite.com/index.php/thepagename/page/x, the links just go to thesite.com/index.php/page/x, which of course results in a 404.

    Thanks for your reply!

  4. moshu
    Posted 7 years ago #

    I tested your template on a local XAMPP (Apache server) install and it works. So, the only thing I suspect to give you troubles must be the IIS server.

    Why would anybody use a Win server?

  5. volfro
    Posted 7 years ago #

    That is incredibly annoying. I blew hours on that crap today.

    Their hosting company sucks. I actually couldn't even use the latest version of WP on it—for whatever reason, it kept springing database errors. Instead of updating their servers to be compatible with widely-used software, their support people insisted that either the client pay for a custom solution or I downgrade to their auto-installed version of WP, 2.2.3.

    So I downgraded, counting on it actually working.

    Looks like I'm going to have to see if they'd be willing to go with a new host. URL rewrites never worked properly anyway (thus the index.php). Ridiculous.

    Thanks a lot for your help, moshu. I was at a dead end — I'm no expert, but I know my way around WP, and couldn't figure out what in the heck I was doing wrong. Guess I should've tested on my own XAMPP before I wasted your time.

  6. volfro
    Posted 7 years ago #

    You're right. I just tested it on my local XAMPP and it works just fine—including rewrites.

    Man that annoys me! Ah well. If they host through me I make an extra couple of bucks, so. No complaints.

    Thanks again.

Topic Closed

This topic has been closed to new replies.

About this Topic