How do I make wp_localize_script variables available for child theme?
-
Hi,
I am trying to create a child theme and want to deregister the original javascript and enqueue my own. Its the original javascript of the theme but a bit different ??
The problem that I have is that in the parent theme a lot of variables are ‘pushed’ to JS using : wp_localize_script.
The variables that are loaded in parents functions.php are not available in my child themes javascript. And I am guessing that it is because of the load order. WordPress first loads the child functions.php then the parents. And thus, first load the javascript and then the variables.
Any ideas on how to solve this?
Thanks,
J
- The topic ‘How do I make wp_localize_script variables available for child theme?’ is closed to new replies.