Skip to main content

All Questions

2 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0 votes
0 answers
99 views

How to echo inside the js file with wp_localize_script?

I have used wp_localize_script() to pass a variable to a javascript file. var countries = [searchresults.data]; The variable is getting passed but I want it in a js file like below: var countries = ...
user avatar
0 votes
0 answers
218 views

Passing a location-dependent array via wp_localize_script within a shortcode

I have created a shortcode that is intended to be inserted into custom field of a music custom post type. The shortcode is coverted into an audio playlist using the jplayer jquery plugin (and it's ...
Mr. G's user avatar
  • 127