I am using Dzonia Lite theme in my website. When I try to remove the cufon script from my functions.php file the sliders that were present in the website are not working.
Colud anyone suggest me how to overcome this issue?
scripts in my functions.php
function inkthemes_wp_enqueue_scripts() {
if (!is_admin()) {
wp_enqueue_script('jquery');
wp_enqueue_script('inkthemes-ddsmoothmenu', get_template_directory_uri() . "/js/ddsmoothmenu.js", array('jquery'));
wp_enqueue_script('inkthemes-slides', get_template_directory_uri() . "/js/slides.min.jquery.js", array('jquery'));
wp_enqueue_script('inkthemes-jcarouselite', get_template_directory_uri() . "/js/jcarousellite_1.0.1.js", array('jquery'));
wp_enqueue_script('inkthemes-confu-ui', get_template_directory_uri() . "/js/cufon-yui.js", array('jquery'));
wp_enqueue_script('inkthemes-quicksand-confu', get_template_directory_uri() . '/js/mank-sans.cufonfonts.js', array('jquery'));
wp_enqueue_script('inkthemes-custom', get_template_directory_uri() . '/js/custom.js', array('jquery'));
} elseif (is_admin()) {
}
}
You can remove scripts with
wp_dequeue_script()
:But be careful — as @gdaniel pointed out, if the theme depends on
cufon
, you will break things.You can just remove or comment out the line:
Update:
You would also need to remove or comment out:
Which is the font cufon is trying to load.
Custom.js probably makes references to those two lines. You should see something related like this below in your custom.js file.
If custom.js has any cufon functions then you will get errors, because it can’t find those functions.