Slider in all posts / pages

  • atree123

    #340

    Hello,

    Thanks for the great theme. Is it possible to show the slide in all single posts?

    Cheers,

    Admin

    Syahir Hakim

    #12192

    Yes it is. Using a child theme, create a functions.php file inside the child theme and insert this code:

    <?php
    // Create our own function that control where the slider is displayed
    function graphene_custom_display_slider(){
    if (is_front_page() || is_single() || is_page())
    graphene_slider();
    }

    // Remove the theme's default slider loading location
    function graphene_remove_action(){
    remove_action('graphene_top_content', 'graphene_display_slider');
    remove_action('graphene_bottom_content', 'graphene_display_slider');
    }
    add_action('after_setup_theme', 'graphene_remove_action');

    // Add our own custom function that controls where the slider is displayed
    if (!get_option('graphene_slider_disable')){
    if (!get_option('graphene_slider_position'))
    add_action('graphene_top_content', 'graphene_custom_display_slider');
    else
    add_action('graphene_bottom_content', 'graphene_custom_display_slider');
    }
    ?>

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

  • You must be logged in to reply to this topic.