bloginfo url in javascript

I’m trying to set in a variable on Javascript, and then to set src of an img element, but in the html it’s been printed as src=”” and not as the actually url.

This is how I tried to do it:

var wpTemplateUrl = “”;
primaryImg.src = wpTemplateUrl;

Read more here:: bloginfo url in javascript

Leave a Reply

Your email address will not be published. Required fields are marked *