Skip Navigation

[Resolved] Create a pagination only for siblings pages

This thread is resolved. Here is a description of the problem and solution.

Problem:
The user would like to create next/previous links based on the relationship to their parent post.

Solution:
You can achieve this with a custom shortcode that will check for the next/previous sibling in a one-to-many relationship. Check this similar ticket summary for an example here https://toolset.com/forums/topic/next-and-previous-sibling-posts-in-a-one-to-many-post-relationship/

This support ticket is created 3 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 2 replies, has 2 voices.

Last updated by camila 3 years ago.

Assisted by: Jamal.

Author
Posts
#2219501

Hello,
I will like to add pagination in a Content Template that goes to sibling pages only.

Example:
I have a Tax Sale (CPT) that has many Properties (CPT). This is set up as a One to many relationship.

When I am on one of the Properties Single Page (Content Template), I would like to build pagination with [wpv-pager-next-page ]] and [wpv-pager-prev-page] but I just want the sibling pages of that property. That is not working as expected.

Any suggestion on how to accomplish this? Right Now I am using a nested view to get the child post of the current tax sale. What I am displaying is just the Titles and URLs of the sibling's posts but I need to make them pagination.

thanks

#2220511

Hello and thank you for contacting the Toolset support.

You can achieve this with a custom shortcode that will check for the next/previous sibling in a one-to-many relationship. Check this similar ticket summary for an example here https://toolset.com/forums/topic/next-and-previous-sibling-posts-in-a-one-to-many-post-relationship/

Let me know if you have any questions.

#2220633

My issue is resolved now. Thank you!