Hi,
I want to include JavaScript file using:
<script type="text/javascript" src="file.js.php"></script>
In this "file.js.php" I want to use _e function, but this doesn't work.
What do I have to do more to function _e I work in a given file?
--
CT
Hi,
I want to include JavaScript file using:
<script type="text/javascript" src="file.js.php"></script>
In this "file.js.php" I want to use _e function, but this doesn't work.
What do I have to do more to function _e I work in a given file?
--
CT
Hi!
So, if u want to attach .js file, all U need to do, is use
<?php include("file.php"); ?>
In this file start with
<script type="text/javascript">
and close the tag after Your javascript.
Powodzenia ;)
No, I don't ask how to load JavaScript file with php extension. All I had to do is:
define('ABSPATH', 'abs path to Your wp install');
require_once(ABSPATH.'wp-config.php');
require_once(ABSPATH.'url to Your JavaScript file');
And then You may use _e function.
Regards,
CT
You must log in to post.