Answer the question
In order to leave comments, you need to log in
How to execute js in wordpress plugin?
Hello! Guys, such a question. I have a plugin, and on action Init I hang up a function that first takes data from the database ($wpdb->get_results), and then translates it into json for a js script. But js is apparently forbidden in the body of the plugin, and I need to somehow pass json to the js script .. if done through wp_enqueue_script(), then json cannot be passed .. Can someone tell me something?
Answer the question
In order to leave comments, you need to log in
jQuery and Ajax will help you
wordpress.stackexchange.com/questions/168692/cant-...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question