Skip Navigation

[Resolved] I’d like to have results linked based on criteria…

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

Problem:

Q1) create a photo lightbox sliders

Q2) add the ability that I get a custom URL that will be aware of the most recent search result that sent me here.

Solution:

Q1) You can setup custom JS codes to setup the lightbox and the next/previous arrow

Q2) It needs custom codes, see details here:

https://toolset.com/forums/topic/id-like-to-have-results-linked-based-on-criteria/#post-1125930

Relevant Documentation:

https://developer.wordpress.org/reference/hooks/wp_loaded/

This support ticket is created 6 years, 3 months 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: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by markj-10 6 years, 2 months ago.

Assisted by: Luo Yang.

Author
Posts
#1125374

when I use views to filter down I'd love it if by one of two methods it might be possible to have my results be filter aware.
it may already exist, I've been reading and looking for it.

-- imagine a realtor site --
I filter by zipcode and number of bedrooms
a view output shows all the matches..... 12 out of 34 listings are in my zipcode with my # of bedrooms

method 1, like a photo lightbox.. preferred method I think
I click the first result, and instead of jumping straight to that page, (current behavior) the page gets sumperimposed over my search screen and adds borders added to my target page, with left and right arrows, and and X to close...
if I click either arrow, it jumps to the next page result that happens to match the search results lying underneath.
At the end of results (left arrow chosen on first result, right arrow chosen on last result)
it loops around carousel style to the other end of the list and continues.. clicking the X brings me back to my search results page, options still live and selected.

method 2,
add the ability that I get a custom URL that will be aware of the most recent search result that sent me here,
that I add to my page as any other link "result next" or "result previous" and I put that in all my pages that will be called by toolset filters, I can also call a link 'return to last search results'
and if clicked, toolset will know what the last search performed had for result and which page I am on at the moment....
perhaps passes through the tcpid to the page as it opens....

if you go to my existing page at
hidden link
and select 'ocean view' under the fourth col "view-pick one"
you get six results.... I'd like to be able to flip through all six of them, without right click opening individual rooms.

if this does exist? send me a pointer to learn & try out?

#1125930

Hello,

There are not such kinds of built-in features within Views plugin, here are my suggestions:

method 1) I assume we are talking about such kind of lightbox sliders:
hidden link

If it is, you can setup custom JS codes to setup the lightbox and the next/previous arrow, above URL is a demo of plugin:https://wordpress.org/plugins/lightbox-slider/

And you can also try other similar plugins, for example:
https://wordpress.org/plugins/search/flex+slider/

Try to output the views result, setup the HTML codes according to their document, but according to our support policy
https://toolset.com/toolset-support-policy/
It is out the range of Toolset support, you might consider Toolset Contractors:
https://toolset.com/contractors/

method 2) Views plugin is for display the data, it can not save the custom URL, I suggest you try these:
1) Create a custom multiple instance URL field, register it to wordpress page
https://toolset.com/documentation/user-guides/using-custom-fields/
2) When user submit the search form, he is redirect to the page with new custom URL, use action hook "wp_loaded" to trigger a custom PHP function,
https://developer.wordpress.org/reference/hooks/wp_loaded/
In this function, get the current custom URL
hidden link
REQUEST_URI
The URI which was given in order to access this page
3) save it into custom URL field:
https://developer.wordpress.org/reference/functions/add_post_meta/

In front-end, display the URL field for admin user:
https://toolset.com/documentation/user-guides/repeating-fields/#Displaying%20Repeating%20Fields

For your reference.

#1129962

I'll work it, thank you