Navigation überspringen

[Gelöst] Link to next/previous search result in single custom post if opened via search

This support ticket is created vor 3 Jahren, 9 Monaten. 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Dieses Thema enthält 7 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Shane vor 3 Jahren, 8 Monaten.

Assistiert von: Shane.

Author
Artikel
#2013343

Hi,
I would like my visitors to be able to scan through search results without having to go back to the search site each time. My ideal would be a "next search result" button on the right and a "previous search result" button on the left similar to a photo gallery slider.
Sounds a bit like custom programming but I am happy to pay for it and share the results with the community. I guess it might be useful in many cases.
Best,
Boris

#2013881

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Hi Boris,

Thank you for getting in touch.

Unfortunately something like this isn't natively possible to do. This is because when you click to view the post that was in the search results it will take you to the actual post. When on the actual post how the wordpress pagination works is that it will send you to the next post based on published date and not the search results for views.

However there is an alternative to this in that you can have the search but limit the search results to be 1 item per page using the pagination settings of the search.

With this you can indeed paginate to the next page of the search results but in order for you to have the listings of results, this will need to be on a separate page entirely.

So in short You can have the search results and paginate through the individual posts if you set the search to display 1 item per page, however you aren't able to have the lists of results at the same time on the same view.

Please let me know if this helps.
Thanks,
Shane

#2014351

Thank you Shane,

that makes sense. However I want both, an overview of the search results with many items and if you click on one I would like to be taken to the same search result, but showing each item as if it was the actual post in the manner you suggested. Is it possible to switch between views (overview and single) keeping the search result? And if yes, can I jump in the single view to the active post?
Thank you so much for your time,
Boris

#2014357

Hi Shane,

thank you, that makes a lot of sense. However, I want both, an overview of the search results and if you click on one, a view of the same search result but appearing as the single posts in the manner you suggested. Is it possible to switch between different views (overview and single) without losing the search result? And if yes, can I jump to the active post (or rather the active search result item) in the single view?
Thanks a lot for your time,
Boris

#2014361

Hi Shane,

thank you, that makes a lot of sense. However, I want both, the overview of the search results and if you click on one the view of the same search result but appearing as if it was the single post, i in the manner you suggested. Is it possible to switch between these different views (overview and single item) without loosing the search result? And if yes, is it possible to jump to the active item in the single view?
Or another possibility: Can I have the last active search in a widget on the sidebar? Then I could link to the actual post and visitors could jump to the next search result vie this widget.

Thanks for you time,
Boris

#2014935

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Hi Boris,

Is it possible to switch between views (overview and single) keeping the search result? And if yes, can I jump in the single view to the active post?

No this is not possible to do unless you are using custom coding to achieve this.

Can I have the last active search in a widget on the sidebar? Then I could link to the actual post and visitors could jump to the next search result vie this widget.

Once you click on the post in the search then all the parameters will be lost in the URL, this means that even if you click to the single post from the search and have the sidebar with another search then that search won't be autofilled.

Doing this is out of the scope of what our views plugin is capable of doing without additional customizations.

Thanks,
Shane

#2016865

Thank you Shane,
I posted this for custom coding in codeable. If I get a pleasing result I am happy to share it here. If you do not want to wait that long you are welcome to close this topic as resolved.

All the best,
Boris

#2021075

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Hi Boris,

Thank you for the update.

I'm going to mark this one as resolved.

Thanks,
Shane