Tagged: x
-
AuthorPosts
-
June 7, 2016 at 11:25 am #1030209
Hello,
I’m trying to make changes to x-head.min.js in my child theme. To do this, I’m following the helpful forum discussion on this topic here.
I have followed the instructions, copied the js file to a folder in my child theme, and created a function in functions.php to enqueue the script in the child theme and dequeue the script in the parent theme.
The result is that the child theme x-head.min.js is enqueued, but the parent theme x-head.min.js is not dequeued.Here’s the code I’m using:
add_action( ‘wp_enqueue_scripts’, ‘wpse26822_script_fix’ );
function wpse26822_script_fix()
{
wp_dequeue_script( ‘x-head.min.js’ );
wp_enqueue_script( ‘x-head.min.js’, get_stylesheet_directory_uri() . ‘/js/x-head.min.js’, array( ‘jquery’ ) );
}Chan you tell me what I’m doing wrong?
Thank you!
June 7, 2016 at 11:34 am #1030224UPDATE! I figured it out. I should have been dequeue-ing and enqueue-ing ‘x-site-head’. Problem resolved! Thank you.
June 7, 2016 at 6:04 pm #1030839Glad you were able to figure it out 🙂
-
AuthorPosts