Can I use a View in my JS code, by adding the View's shortcode where the JS expects some results?
The View returns the results the code expects.
Generally, ShortCodes can not be added to JS.
You could add the JS within script tags to your HTML section of a content Template for example.
Then you could apply this custom code here to retrieve a "raw" Views' loop result.
This can then eventually be used to populate your Custom JS.
This is however not suggetsed, n or supported.
It is a full custom solution - and not agreeing with Toolset Views' major purpose, which is to display - not deliver data.
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.
Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | - | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 |
- | - | - | - | - | - | - |
Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)
Este tema contiene 4 respuestas, tiene 2 mensajes.
Última actualización por hace 6 años, 8 meses.
Asistido por: Beda.