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.
Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.
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)
Dieses Thema enthält 4 Antworten, hat 2 Stimmen.
Zuletzt aktualisiert von vor 6 Jahren, 8 Monaten.
Assistiert von: Beda.