I’m using Photospace as a gallery slider within my hatch pro wp theme (you can check here).
The default transition effect between slides is a crossover effect (like this example), but the effect in my slider seems to be image fade to white, then white fades to image. Not sure why this is happening.
Here is the code that calls other scripts:
/* Enqueue scripts (and related stylesheets) */
add_action( 'wp_enqueue_scripts', 'hatch_pro_scripts' );
function hatch_pro_scripts() {
if ( !is_admin() ) {
/* Enqueue Scripts */
wp_enqueue_script( 'hatch_pro_fitvids', get_template_directory_uri() . '/js/fitvids/jquery.fitvids.js', array( 'jquery' ), '1.0', true );
/* Enqueue Fancybox */
if ( hybrid_get_setting( 'hatch_pro_fancybox_enable' ) ) {
wp_enqueue_script( 'hatch_pro_fancybox', get_template_directory_uri() . '/js/fancybox/jquery.fancybox-1.3.4.pack.js', array( 'jquery' ), '1.0', true );
wp_enqueue_style( 'hatch_pro_fancybox-stylesheet', get_template_directory_uri() . '/js/fancybox/jquery.fancybox-1.3.4.css', false, 1.0, 'screen' );
wp_enqueue_script( 'hatch_pro_footer-scripts', get_template_directory_uri() . '/js/footer-scripts.js', array( 'jquery', 'hatch_pro_fitvids', 'hatch_pro_fancybox' ), '1.0', true );
} else {
wp_enqueue_script( 'hatch_pro_footer-scripts-light', get_template_directory_uri() . '/js/footer-scripts-light.js', array( 'jquery', 'hatch_pro_fitvids' ), '1.0', true );
}
}
}
How can I resolve this?
I’m comfortable with CSS, but not so much with PHP or other heavier coding.
If the theme was coded using Theme Development Standards, then you can use the function
wp_deregister_script
to remove conflicting scripts from the page where the slider is being used.[update]
The original solution (at the bottom) worked in a specific plugin situation (with WP Touch).
I think this is the proper one:
[first version]
For example, in the following snippet I’m removing all the scripts and style of the plugin Alo Easy Mail if the site is being viewed in a mobile device, check comments for your use case.
Put it at the end of the theme’s
functions.php
file (or child theme’s).This way, you can remove the conflicting scripts from a specific page, and let them load in the rest.
Search your theme for
wp_register_script
and grab the handle to use with deregister.The
remove_action
works upon alladd_action
that the theme has.