0

I have a site where I have the following permalink structure:

/blog/%category%/%postname%/

This has been set in the Settings -> Permalink Settings.

I also have a page named /blog/. This page gives me the access to all my posts. The problem I encounter is when you try to paginate in the /blog page, since the pagination link looks like this:

https://www.mywebsite.com/blog/page/2/

It takes me to a 404 since, I think, the link matchets the posts permalink structure.

Do you know how to make the pagination in /blog work and still have my posts permalink structure?

Thank you very much!

0

The problem you have, I guess, it is because you run a secondary query inside the "Blog" page to get the blog layout, but you should not do that. Instead, go to "wp-admin/options-reading.php" and set the "Posts page" to the Blog page. Now, the Blog page will use the home.php or index.php template and the query for posts will be executed by WordPerss,you don't need a custom query to build the blog.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.