I need to be able to insert some PHP into an external .js file. Is this possible? I have created a slider using basic slider and need to have the page titles as markers at the top of the slider.
This is the code the .js file uses to generate the markers currently.
var slidenum = key + 1,
var marker = $('<li><a href="#">'+ slidenum +'</a></li>');
I need to replace '+ slidenum +' with the WordPress function 'get_title'. Can this be replaced with php?