WordPress.org

Support

Support » Themes and Templates » [Resolved] Slider Loads Several Seconds Late

[Resolved] Slider Loads Several Seconds Late

  • Thanks for the theme. It’s amazing… better than anything I have used before. But I am having two little problems with the slider. 1) It loads several secs after the page load. I was wondering if there is a way to remove the delay.

    2) When I set it up to display only one post, it doesn’t work. I was also wondering if there is a solution to that.

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Theme Author Richie KS

    @rkcorp

    check lib/scripts/custom.js for delay(400) reduce it
    just save the same id post in theme option slider via post id like 3,3
    it wont work if only 1 post to slide.

    Hi Richie,

    1) In custom.js, which should i change? delay(2000), fadeIn(400) or delay(8000)?

    Line 7...jQuery('#featuredbox').delay(2000).fadeIn(400);
    
    Line 22...delay: 8000

    2) I’m using child theme…do I just copy custom.js and put it in the child folder or do I need to copy the ‘lib’ folder into my child folder?

    3) Do i need to learn to use javascript with wordpress for this to work?

    Thanks!

    Theme Author Richie KS

    @rkcorp

    the delay load is normal to wait for the slider images to load completely.
    create a new folder lib/scripts in child theme and copy paste the custom.js

    and edit delay(2000) to delay(1)

    now here’s the tricky part for fully child theme convert, open child theme functions.php *create one if do not have* and copy paste this code

    function mesocolumn_child_theme_load_scripts() {
    global $theme_version, $is_IE;
    //unregister parent custom.js first
    wp_dequeue_script('custom-js');
    //register child theme custom.js
    wp_enqueue_script('child-custom-js', get_stylesheet_directory_uri() . '/lib/scripts/custom.js', false,$theme_version, true );
    }
    add_action( 'wp_enqueue_scripts', 'mesocolumn_child_theme_load_scripts',20 );

    thank you very much for the clear instructions, Ritchie. everything is working now.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Slider Loads Several Seconds Late’ is closed to new replies.