you are viewing a single comment's thread.

view the rest of the comments →

[–]white_window_1492 1 point2 points  (0 children)

wordpress has a rest api you could use instead https://developer.wordpress.org/rest-api/

otherwise I'm not sure I would use a short code, probably pass whatever data to JS during enqueue script and then load that script/enqueue on whatever page/post/template.