[Resolved] Navigate through underlying pages within search results
This support ticket is created 5 years, 1 month 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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
I want to be able to navigate (back - forward) through all pages within a certain search. If I use the standard WP option it just navigates through all pages form within a post type.
For example...
Here I define the search criteria: hidden link which would be distance and place.
On the underlying 'detail page' I would like to place a back and forward button that will navigate through the range defined earlier. Example: hidden link
Here I searched on 'Drachten' which shows me 8 results. Going back and forward should be limited to 8 profiles.
Thank you for contacting us and I'll be happy to assist.
To restrict the next and previous item links on the single post pages (or detail pages), based on the visitor's search filters, you'll need to pass on the information from that view to those detail pages.
The best way to keep track of that information would be to use PHP global variable: $_SESSION: hidden link
1. First, one will be used to create a new array in the $_SESSION global variable before the loop in the view starts (i.e. above the shortcode [wpv-items-found] )
2. The second one can be placed inside the views individual loop item to set the current post's ID in that array.
3. The third one will need to be placed on the detail pages, which will get the array from that session array and show the links from the previous and the next post IDs accordingly.
I hope this helps and for more personalized assistance around custom code, you can consider hiring a professional from our list of recommended contractors: https://toolset.com/contractors/
Thanks for your guidance 🙂
I think I get the gist of it, but I'll have to do some reading up on the subject... so I'll put it on roll out phase 2 for now.