Slider on a single page & at the bottom

  • freakitchen

    #5480

    Hi there,

    Using the following code I have managed to get the slider to appear on a single page on my site in addition to the homepage:

    <?
    function graphene_display_slider(){
    if (is_front_page() || is_page('Student Portal')){
    graphene_slider();
    add_action('wp_footer', 'graphene_scrollable');}
    }

    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' );
    ?>

    I would like to have the slider below the page content on this page only. Is it possible to do this?

    Thankyou.

    Prasanna SP

    #32017

    Try this, (put the code anywhere between opening and closing php tags)

    function move_graphene_slider_student_portal() {
    if ( is_page('Student Portal') ) {
    remove_action( 'graphene_top_content', 'graphene_display_slider' );
    add_action( 'graphene_bottom_content', 'graphene_display_slider' );
    }
    }

    add_action( 'template_redirect', 'move_graphene_slider_student_portal' );
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.