What is the code you are using?
function add_required_scripts() {
// register your script location and dependencies
wp_register_script('customscripts', '/get_stylesheet_directory() . /js/bootstrap.min.js', array('jquery'));
wp_register_script('flexslider', '/get_stylesheet_directory() . /jquery.flexslider-min.js', array('jquery'), '2.1');
// enqueue the script
wp_enqueue_script('customscripts');
wp_enqueue_script('flexslider');
}
add_action('wp_enqueue_scripts', 'add_required_scripts');
Pretty much the same for the stylesheets just using wp_enque_style()
For the sake of getting things done I currently replaced the calls to get_stylesheet_directory() with the actual path, ie: http://localhost/clients/myclient/js/flexslider.js which loads the scripts and has allowed me to keep working but obviously this is not the best solution.
thanks
Get rid of the quote and slash before the function. It should be:
wp_enqueue_script( 'custom-script', get_stylesheet_diretory() . '/js/file.js', array( 'jquery' ) );
Sorry, that was actually a typo on my part here, Like I said I am currently using the full path and replaced it so you could see my non working code. The actual code does not have those characters.
Code is this:
function add_required_scripts() {
// register your script location and dependencies
wp_register_script('bootstrap', get_stylesheet_directory() . '/wp-content/themes/twentyfourteen-child/js/bootstrap.min.js', array('jquery'));
wp_register_script('flexslider', '/wp-content/themes/twentyfourteen-child/jquery.flexslider-min.js', array('jquery'), '2.1');
// enqueue the script
wp_enqueue_script('bootstrap');
wp_enqueue_script('flexslider');
}
add_action('wp_enqueue_scripts', 'add_required_scripts');
Still returning the broken file path of:
http://localhost/clients/buysellmyhomelaC:xampphtdocsclientsmyclient/wp-content/themes/twentyfourteen-child/wp-content/themes/twentyfourteen-child/js/bootstrap.min.js?ver=3.8.2
I think part of that reason is you are including the /wp-content/themes/twentyfourteen-child.