1

I am using wp-cufon plugin , to enable cufon on my site . But I do not want cufon in mobile version . If there is any way to disable that plugin in mobile version or in just disable specific java script ?

1
  • Why do you need different stuff server-side based on the device that the user is using? We are in the responsive design era, that means that the server always performs the same task and send the same information to the user. Then, you can work client-side in different ways based on characteristics of the device (for example, screen resolution), but always client-side. Plus, server-side detection of devices is someting you can not trust.
    – cybmeta
    Dec 10 '14 at 9:39
1

In wordpress exists wp_is_mobile() function.This may help you.

You must see how is named cufon handle in plugin

if(wp_is_mobile()){
    wp_dequeue_script( 'cufon_handle' );
}
3
  • Thanks , but how to disable a specific plugin in that condition ? Or How to dequeue a script in that condition , note that , the javascript is attached by a plugin Dec 10 '14 at 7:18
  • I think this link may be useful Dec 10 '14 at 9:01
  • Or you must see how they register script and make deque,wp_deque_script('plugin_script_name'),deque_script Dec 10 '14 at 9:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.