0

I've defined this permalink structure custom-post-type/taxonomy/post-name

It all works like a charm, except when it comes to pagination. When I move to page 2, it loads a post instead of the second page.

So url is: custom-post-type/taxonomy/page/2 But it changes the url and goes to: custom-post-type/other-taxonomy/one-post/2

Anyone who knows about permalink structures and pagination? Hope you can help me out.


UPDATE

I have defined these:

Portfolio items base: portfolio

Portfolio categories base: portfolio

I've installed Custom Post Types Permalinks and setted up portfolio url like this: /%portfolio_entries%/%postname%

If I define it like:

/%portfolio_entries%/%postname%/%page%

Pagination works, but portfolio elements aren't being displayed anymore.

Any idea how can I make %page% optional?

0

I had similar issue with pagination also, but my pagination everytime redirects to 404. What I did was use standard loop but with pre_get_posts function where I defined additional paramets. Now pagination works perfectly on archive, taxonomy or search template.

https://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts

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.