elliotcullen
Forum Replies Created
-
Forum: Plugins
In reply to: [Simple Custom CSS and JS] Page not finding correct script locationHi Diana,
First of all, thank you for the response – I am currently using the paid version, and have not illegally downloaded or obtained it so that won’t be causing this issue – sorry for the confusion there, I was testing out different linking and sent the wrong screenshot. However I did change my domain recently and am just now noticing the error about re-activating the license, and have fixed that – that didn’t fix the error unfortunately.
Secondly, I may not have made myself clear – the error persist regardless of if the linking type is internal or external.
Thirdly (and here is where the problem is I suspect) I am linking from the themes functions.php file, but am doing that so I may register it as a script, and pass data using enqueue and localise. If I remove that, I get no error however my data doesn’t pass. My question then becomes, how can I pass my data from functions.php to my various JavaScript files?
Thanks for your quick response, I got it working! I wasn’t quite sure of the functionality or usefulness of
wp_localize_script()but looked deeper and it was juts what I needed.As another aside (I can make a new topic if you wish) I’ve just bought the pro version, as I am looking to pass a session key received from the initial request as a param into subsequent requests, including calls that will go to different APIs. Can dynamic variables can be placed into query string fields in the same way they can be placed into the endpoint field?