Been pulling my hair out with this… basically I have a custom post type (videos) and a custom taxonomy (videos_category) which uses a template taxonomy-videos_category when I set the page to only show 5 videos, the pagination to show the next page of videos throws a 404. I.E
/videos/introduction/page/2.
I know it’s not directly a Sage issue, but just wondering what best practice to handle this in Sage or at all :S i’m stumped… do I need to make a new Wp-query?? I have no idea
Pagination can be a big old mess. When you say “set the page to only show 5 videos” are you talking about this setting?
Or are you using pre_get_posts or something to adjust how many posts are displayed? If you’re using a filter or action to adjust the number of posts displayed, you often need to make sure you’re modifying some other…stuff…or pagination will stop working right. If you are using filters/actions, posting some of your code might help diagnose.
Otherwise, I feel a little silly saying this but…have you refreshed your permalinks?
I didn’t set any filters… because I wasn’t having much luck I thought hey maybe I can just create a taxonomy-template and it will figure it out so naive haha
Hey @alwaysblank I actually managed to find the 2nd page, it’s /videos/introduction?paged=2, so I guess I just need to do a rewrite or something to change ?paged=2 to page/2 ? soooo close, I think
So after many trials and errors, I found I had to create a specific rewrite rule to go into my filters.php, one that handles post type ‘videos’ and the category (taxonomy) ‘videos_category’: