• Hello!
    I use a page to display posts from 3 sub-cats. But right now i cant get pagination to work, it just sends me to the next post and not a new page showing posts.. This is my code:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    So how can i get a working pagination here? i just want it to grab from the categories in the query. Thanks in advance!

    Edit: I just realized that if this could show sub-categories and not just the category-catname.php that would also work for me.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter mYrAn

    (@myran)

    http://pastebin.com/FMM6rQAY

    Since i couldn’t have in the post :<

    Moderator keesiemeijer

    (@keesiemeijer)

    try it with this: http://pastebin.com/AZ5zdcja

    Thread Starter mYrAn

    (@myran)

    You missed a commasign, otherwise it worked fine 🙂 But right know it displays both the prev and next even if there isn’t a prev or next :< is there a way to get around this?

    Moderator keesiemeijer

    (@keesiemeijer)

    This is not normal behavior, can we have a link to this page? Maybe resaving your permalink structure under Settings > Permalinks will do the trick.

    Thread Starter mYrAn

    (@myran)

    Nevermind that, i had forgetten to remove a bit of code when i modified the buttons :< A new question comes to mind tough. I have a category named “blog”, and the page im doing all this is called “blog”. So they have the same permalink (blog). But this causes a problem with the pagination, it gets a 404 now :< Is there a way to go around this? So it doesnt try to do it in the category blog, but in the page blog. The reason i have it like this is that when i go to mysite.com/blog, it displays all posts (without pagination before), and when you click a post its still mysite.com/blog/postname, and not mysite.com/othercatname/postname..

    Edit: If i change the link the anchor for the next-page-button from mysite.com/blog/page/2 to mysite.com/blog/2 it works. I recon this is the easiest fix, but is there a way to do it?

    Moderator keesiemeijer

    (@keesiemeijer)

    What is your permalink structure?
    If you click a post doesn’t it go to example.com/postname ?

    Thread Starter mYrAn

    (@myran)

    %category%/%postname% with category base removed(no ‘category’ infront of categoryname)! Read the edit in the last post.

    Moderator keesiemeijer

    (@keesiemeijer)

    If you have %category% as the first part of the structure and a category and page with the same title there will be apermalink conflict. There’s no easy way to do what you want. Maybe you can use custom taxonomies to structure the site the way you want

    Thread Starter mYrAn

    (@myran)

    damn.. Is there really no easy way to just change the link from page/2 to /2 :<?
    Edit: Just a thought, wouldn’t jquerys replace function be able to remove the ‘page’ part from the link :o?

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Display posts on page with pagination’ is closed to new replies.