Hi all. I’ve got the plugin working on my php pages but now I need to display a field inside a .js file. The .js file is a Google Map file that’s displaying popup information.
I tried to rename the js file to file.js.php and I also tried .htaccess tricks. Is there an actual native way to display a field inside my .js file?
Thank you!
Yes, you need to use wp_localize_script.
Did you figure out how to so this?