Saltar navegación

[Resuelto] Return to search results button in content template

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem:
I need to add functionality to return to the previous search results.
Solution:
Can you please try with following two solution:

1.

<a href="javascript:window.history.back();">Back to results</a>

2.

<a href="#" onClick="history.go(-1)">Back to results</a> 

If above not solve the issue then you can achieve it using ‘''HTTP_REFERER' in small shortcode:
http://php.net/manual/en/reserved.variables.server.php
Relevant Documentation:

This support ticket is created hace 6 años, 10 meses. 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
- 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 -
- 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Este tema contiene 4 respuestas, tiene 2 mensajes.

Última actualización por jasonH-5 hace 6 años, 10 meses.

Asistido por: Noman.

Autor
Mensajes
#616743

Hello,

I am creating a job listing site with a CRED form to apply for a job. Once the user clicks "Apply" and is brought to the job application, I need to add functionality to return to the previous search results. Can you tell me how this is possible?

Thank you.

#616851

Noman
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Karachi (GMT+05:00)

Hello Jason,

Thank you for contacting Toolset support. We have another client who had the similar issue and was also able to solve it, please take a look:
https://toolset.com/forums/topic/how-to-have-a-back-to-search-results-button/#post-360201

Thank you

#616991

This worked but when I do a parametric search using AJAX the url changes to something like this:

enlace oculto

When a post search result is clicked on the user cannot use the method to return to the search results as it loads a blank page.

#617403

Noman
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Karachi (GMT+05:00)

Hello Jason,

Can you please try with following two solution:
1)

<a href="javascript:window.history.back();">Back to results</a>

2)

<a href="#" onClick="history.go(-1)">Back to results</a>

If above not solve the issue then you can achieve it using ‘''HTTP_REFERER' in small shortcode:
enlace oculto

Thank you

#618208

Solved. Thank you.