Hi Jason, although I managed to do it via taking javascript into the php file, I tried it with the meta tags again after seeing your reply. And I saw it works
But now I know why it did’t work at the first time I tried. Because I had used the exact syntax you wrote in your first reply. But after checking the codes at your links, now I know meta tags defined in php should be called in javascript like:
url = jQuery("meta[name=template_url]").attr('content')
the jQuery(), .attr('content') and the quotes were missing at my first attempt
Once again thanks so much for helping.
- Author had a File in an Envato Bundle
- Author was Featured
- Bought between 1 and 9 items
- Europe
- Exclusive Author
- Has been a member for 2-3 years
- Item was Featured
- Referred between 100 and 199 users
allways remember that javascript is a browser based language and php is a server based language, so php will not execute after page load, but javascript could
Hmm, I didn’t know that. Luckily, it doesn’t cause a problem while using a previously defined php variable in javascript. But it’s better to keep that in mind, thanks for the input Duotive 
