Back to Top

How to Fix Category Pagination in WordPress

Nowadays I am working on one site which is in WordPress and site will have multiple posts from the single category and per page maximum 10 posts will be displayed. If post within a category is more than 10, pagination comes.

so for that I have created one function wph_pagination which is working fine for other sites but it is not working here.

Pagination links are coming but when I am clicking the link, I will get “404 page not found ” error or same content will be displayed on all the page links.

Lets have a look into the code i have written:

Here I have called query_post function because I want to get multiple posts from the specific category.

I have just added one line which I forgot to add before query_posts and because of it pagination was not working.
After adding following line of code, pagination working fine.

so Lets check what changes I have done :

That’s it.

Further Read:

Pagination when getting posts from category in WordPress
Pagination in CodeIgniter
To use Pagination in Joomla

I hope this post will help you. Don’t Forget to Follow us on Twitter or Subscribe us to Get the Latest Updates.

Comments (1)

  1. hi.
    thanks for this good article.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Most Popular Posts

How to Accordion Menu with Modx

Posted on 12 years ago

Bhumi

How to use _remap function Codeigniter

Posted on 12 years ago

Bhumi

How to use NoSQL and MongoDB

Posted on 12 years ago

Bhumi