I'm basically trying to make my js and css files dynamic. I've tried a few different ways of doing this and it isn't seeming to work for me. Any help would be greatly appreciated!
functions.php
function fnp_add_js() {
//I've tried fnp_jquery.js.php fnp_jquery.php and fnp_jquery.js
wp_register_script( 'fnp_jquery', plugins_url( 'fnp_jquery.js.php', __FILE__ ));
wp_enqueue_script('fnp_jquery');
}
base.php
add_action('wp_enqueue_scripts', 'fnp_add_js');
jquery.js (I've tried fnp_jquery.js.php fnp_jquery.php and fnp_jquery.js)
<?php
header('Content-type: text/javascript');
//I've also tried surrounding $(document).ready(function() {} with echo '';
?>
$(document).ready(function() {
//Javascript here
});