I have a custom post eBook and child post Chapter, I want to add the previous and next pagination to the current post and then I can navigate to its brother post. Is it a good practice that I create a View and limit the number of posts to 1 and then add the pagination? How can I directly jump to the nth chapter to the ebook and how do I set the filter?
I usually create a View and then insert it into the content template which is associated with the parent post (eBook), please advise how I can implement it.
Hello. Thank you for contacting the Toolset support.
As you shared the information that you should create a view that should display the parent post, one per page using pagination but why dont you go with the single post instead of creating the view that lists your post (one at a time using pagination). You should create a content template to display single post and attach it to your desired post type.
=> https://toolset.com/course-lesson/creating-templates-to-display-custom-posts/
What do you mean by the single post? The single post you mean is ebook or chapter?
I know how to make a Content Template to parent post (ebook) and include the child post (chapter) by View using the filter like Select posts in an eBook Chapters relationship that are related to the current post in the loop.
If I limit the child post as 1 with pagination, how can I visit the specific chapter by URL because the URL is linked to the parent post.
I know how to make a View with pagination and put it into a page and show the child post (chapter), I can jump to previous / next post by clicking the pagination but I have no idea how I can filter the chapter by selected parent post (ebook) using the URL parameter. As the URL is the page, how can I directly visit the specific child post?
If I make the Content Template to the child post (chapter), how can add the link to link with the brother post which belongs to the same parent? How can I get the previous and next brother's post?
What do you mean by the single post? The single post you mean is ebook or chapter?
==>
The single post of ebook post type.
So, when we display the single post of ebook post type, we can list all the related child posts (chapter) on the single post of ebook.a
if you can tell me what exactly you want to display on what post/pate and send me problem URL and admin access details, once I review your current setting and requirement you share I'll be able to guide you in the right direction.
*** 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.
Not adding pagination to single ebook page, from current setting, I can click to individual chapter from single ebook page but there is no pagination in single chapter page, I don't know how to add the pagination which I can jump to previous or next chapter.
For example, I click chapter 3 from the single ebook page, it jumps to a single chapter page /chapter/1003/, I want to have the pagination in this page, and visitors can jump to chapter 2 or chapter 4, refer to my screenshot, there is a custom field "order" to each chapter post, the order is not must be same as the post id, so I can't assume the next chapter of 1003 is 1004, I have to do the Query with orders to the custom field "order" and get the previous and next post id.
If I make a View in page (hidden link), pagination is easy to be implemented but I don't know how I can build the ebook index on the single ebook page.
Now, when you click on any chapter it will redirect you on that chapter and also pagination is working. Can you please confirm it works as expected: hidden link