I am trying to use pagination in a page template (NOT archive-[post-type]) I have the pagination working until I use 'Rewrite' and 'Use a custom URL format ' option.
My CPT slug is 'news-story'
My 'custom URL format' under options Rewrite is '/parent-page/news'
This gives me exactly what I want for the single post pages:
mydomain.com/parent-page/news/title-of-news-story
However when I try to go to the next page I receive a 404.
Here is the code for my loop with paging on the template page, thank you for you help:
Hello. Thank you for contacting the Toolset support.
Well - this is totally custom code as single post pagination should be supported by theme itself and you are using the custom rewrite.
Still can you try this - instead of 'paged' used 'page. replace following line with your original line:
'page' => $paged
If above does not help - I'm extremely sorry, I can't do much here, as a supporter I need to work within the limits. If you need more assistance with your custom programming issue, please don't hesitate to contact our certified partners.
=> https://toolset.com/consultant/
Thanks for the quick reply. No that does not work, I have switched between page & paged in previous attempts. I understand the limits you must work within.
By 'should be supported by the theme' I assume you mean using archive-* and single-*. So if the solution to get what I need is to use archive-[post-type] and single-[post-type], could you elaborate on that and tell the best way to get those to output the desired url?
To paginate from one single Post to the next with a single CPT page. This needs to be provided by the Theme. If your theme does not provide this, you could use Custom Code to create Pagination links.