[Resolved] Pagination does not work on custom post types
This thread is resolved. Here is a description of the problem and solution.
Problem:
Pagination generated using the WordPress quick tags like: is not working with Layouts.
Solution:
The quick tags are not intended to work within CTs or Layouts. If you want to add support for this feature to CTs or Layouts, please file a feature request.
Hi,
I have multiple custom post types, in addition to the default "posts".
I have long articles that I want to break to multiple pages using the WordPress native command `<!–nextpage–>`
This works successfully in the default "posts", but for all custom post types, the whole content is displayed.
there will be a dummy pagination at the bottom (like this: 1 2 3 4 5), but when i click on any of them, i get the full content again.
I switched to the default twenty nineteen theme, still the same outcome. I tried using a different site altogether (but still has custom post types created by Toolset), still the same outcome.
Here is a test post of type "post": hidden link
Here is the exact same text, pasted in a CPT called "Articles": hidden link
The text is pasted in the "content area" of the CPT.
All the CPTs have a layout created by toolset, and this layout has a "content area" component inserted.
Hello. Thank you for contacting the Toolset support.
I checked with my local test install and I see when I add the following quicktag to post content field in text mode and switch to visual mode and save the post it works:
<!--nextpage-->
The quick tag you are using is wrong `<!–nextpage–>` - it should be <!--nextpage-->.
Hi Minesh,
thanks for the reply.
I don't have (``) in my code. I added it just here to avoid the code parsing in the forum.
The actual code I have is without it. exactly as you show it:
<!--nextpage-->
This is not the issue at all. The issue is that this code does NOT work for custom post types created by Toolset. The code work perfectly fine in the normal "posts" as I demonstrated before.
For me - it works. I just checked with my local test install and it works at my end. The post type is created using Types plugin and I've added the quicktag to the editor and it works.
Can you please send me problem URL and access details.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
Ok - I checked on your install - you are using layout and post content is displayed using the "post content" Cell.
I checked and I found that if I disable the layout and content template on your post and display the post on the front-end it works as expected.
So, I tried to change the layout and delete the post content cell and instead post content cell I tried to add the visual editor cell and within visual editor cell add the [wpv-post-body view_template="None"] but I just do not able to save the layout as I get the message "Background Request Blocked" from wordfance plugin.
Can you please try this workaround and check if that helps?
Hello Minesh, thanks for that.This is a follow up message as it has been a few days since the latest update and i haven't heard anything for the 2nd Tier. When should i expect to hear from them? thanks again.
Thank you very much Minesh,
This issue is going to affect my work flow and cost me time for finding other solutions for presenting my content. May I ask how much will it cost to develop a solution, if it is a reasonable cost , i may be able to help fund it.
regards,
I do not have any ETA on this as I do not see with our internal ticket but I've raised your voice to our internal ticket and I will get back to you as soon as I hear something and keep you posted here.
I checked with Devs and there is still no ETA on it and you should not expect a fix for this issue anytime soon. I suggest you consider there is no fix for a long time and to go that way.