codeguerilla
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Styles and Scripts not loadingMarking this resolved…
Forum: Fixing WordPress
In reply to: Styles and Scripts not loadingHaha Derp. I thought I was loosing my mind there for a moment.
Thanks Esmi ??
Forum: Fixing WordPress
In reply to: Problem with get_stylesheet_directory using child themeSorry, 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:
Forum: Fixing WordPress
In reply to: Problem with get_stylesheet_directory using child themefunction 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: https://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
Forum: Fixing WordPress
In reply to: Horizantal subnav menuIt is a custom theme. As far as I can tell whover started building the theme copied over the twentyfourteen theme and has modified it.