Re: More effects for slideshow
just checking doesnt that que the slider
Last edited by bigcobi (2010-10-25 10:12:18)
Arras WordPress Theme Community Forums
Community support for Arras and other WordPress projects
You are not logged in. Please login or register.
Arras 1.5.2-RC2 Now Available: Download Here
Forum Rules: Please ensure that you have clearly read and understood the forum rules before posting.
User Confirmations / Password Reminders: Please check your spam folder before emailing for help if you have not received the confirmation or password reset emails.
just checking doesnt that que the slider
Last edited by bigcobi (2010-10-25 10:12:18)
Is your slider even working with the fade effect? I think one of the plugins you run is messing up the slideshow.
function kill_js() {
wp_deregister_script( 'jquery-cycle' );
}
add_action( 'wp_print_scripts', 'kill_js', 100 );
function my_slideshow_js() {
if (is_home() || is_front_page() ) {
wp_enqueue_script('jquery-cycle-all', get_stylesheet_directory_uri() . '/js/jquery.cycle.all.js', 'jquery', null, true);
}
}
add_action('wp_print_scripts', 'my_slideshow_js');
function my_add_slideshow_js() {
?>
<script type="text/javascript">
jQuery(document).ready(function($) {
<?php if (is_home() || is_front_page()) : ?>
$('#featured-slideshow').cycle({
fx: 'scrollHorz',
speed: 250,
next: '#controls .next',
prev: '#controls .prev',
timeout: 6000,
pause: 1,
slideExpr: '.featured-slideshow-inner',
height: '<?php $size = arras_get_image_size('featured-slideshow-thumb'); echo $size['h']; ?>px'
});
<?php endif ?>
});
</script>
<?php
}
add_action('wp_footer', 'my_add_slideshow_js');
function my_slideshow_init() {
remove_action('wp_footer', 'arras_add_slideshow_js');
It works just fine, right?
It works just fine, right?
nope! I must be doing something real wrong
Actually, it does work but not always. The old js is still loaded.
You are missing lines after this
function my_slideshow_init() {
remove_action('wp_footer', 'arras_add_slideshow_js');Actually, it does work but not always. The old js is still loaded.
You are missing lines after this
function my_slideshow_init() { remove_action('wp_footer', 'arras_add_slideshow_js');
confused, what am I missing or I should put that somewhere?
It should look like this:
function my_slideshow_init() {
remove_action('wp_footer', 'arras_add_slideshow_js');
}
add_action('init', 'my_slideshow_init');It should look like this:
function my_slideshow_init() { remove_action('wp_footer', 'arras_add_slideshow_js'); } add_action('init', 'my_slideshow_init');
got it thanks again
Powered by PunBB, supported by Informer Technologies, Inc.
Currently installed 9 official extensions. Copyright © 2003–2009 PunBB.
Generated in 0.034 seconds, 12 queries executed