Return to Support

Slider not sliding. :(

Home Forums Graphene WordPress theme Support Slider not sliding. :(

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #2921

    I added this code to my child theme’s functions.php file

    <?php
    function graphene_display_slider(){
    graphene_slider();
    }
    ?>

    And now my slider won’t slide, though it does show up on pages like I wanted. Help?

    #22595
    Prasanna SP
    Member

    It won’t slide unless you add graphene_scrollable action. Try this,

    <?php
    function graphene_display_slider(){
    graphene_slider();
    add_action('wp_footer', 'graphene_scrollable');
    }

    ?>

    #22596

    Yay!!! That totally did it! Thank you so much!!!

    #22597
    Bobby J
    Member

    Hi There I have the same problem. The slider does not slide in my Child theme.

    I have this code in my child theme’s functions.php file:

    <?php
    function graphene_display_slider(){
    if (is_home())
    graphene_slider();
    add_action('wp_footer', 'graphene_scrollable');
    }
    ?>

    If I try to manually make the slide slide by clicking on one of the dots at the bottom right corner of the slider it makes no differens except in the url appears “/#” like this -> xxxx.com/xxxx/#

    What is missing or is wrong?

    Thank you

    #22598
    Prasanna SP
    Member

    Add this too,

    function custom_enqueue_scripts(){
    if ( ! is_admin() ) { // Front-end only
    wp_enqueue_script( 'graphene-jquery-tools' ); // jQuery Tools, required for slider
    }
    }
    add_action( 'wp_enqueue_scripts', 'custom_enqueue_scripts' );

    #22599
    Bobby J
    Member

    Hi, Prasanna,

    I have not yet tried your lates suggestion. It looks like some of the code you posted above might be missing. Would you please confirm if it is correct.

    However, when I pasted the code in my functions.php file it caused errors with the header. When I removed `add_action(‘wp_footer’, ‘graphene_scrollable’);

    }` it stopped giving errors in relation to the header but of course the slider still doesn’t work.

    Here is the entire content of my child’s theme functions.php file:

    <?php
    function graphene_display_slider(){
    if (is_home())
    graphene_slider();

    ?>

    <?php
    function graphene_custom_header_width(){
    return 990;
    }
    function graphene_custom_header_height(){
    return 165;
    }
    add_filter('graphene_header_image_width', 'graphene_custom_header_width');
    add_filter('graphene_header_image_height', 'graphene_custom_header_height');
    }
    ?>

    Many thanks

    #22600
    Prasanna SP
    Member

    Try this sequence. But, I wonder why do you need to write a custom slider function if you want to show slider only on the homepage!

    <?php

    // Slider on homepage
    function graphene_display_slider(){
    if (is_home())
    graphene_slider();
    add_action('wp_footer', 'graphene_scrollable');
    }
    // JQuary tool for slider
    function custom_enqueue_scripts(){
    if ( ! is_admin() ) { // Front-end only
    wp_enqueue_script( 'graphene-jquery-tools' ); // jQuery Tools, required for slider
    }
    }
    add_action( 'wp_enqueue_scripts', 'custom_enqueue_scripts' );

    // Custom Header Image
    function graphene_custom_header_width(){
    return 990;
    }
    function graphene_custom_header_height(){
    return 165;
    }
    add_filter('graphene_header_image_width', 'graphene_custom_header_width');
    add_filter('graphene_header_image_height', 'graphene_custom_header_height');
    }

    ?>

    #22601

    Yay! I just updated my theme and the slider stopped sliding… again. Adding the JQuery bit fixed it right up! Thanks again!

    #22602
    Bobby J
    Member

    Hi Prassana,

    It worked perfectly. I only had to delete the last ” } ” before the “?>”

    Great help

    Manny Thanks!

    #22603
    Prasanna SP
    Member

    @Bobby J Ha.. ha.. I didn’t look too much at your code. } was there in your code. And thankfully you figured it out yourself! 🙂

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.