Keep slider on the home page

  • bazonline

    #495

    Syahir,

    I want to keep the slider on the front page, even when you pick one post, activate a post in the slider, choose a tag, category, etc..

    and in full width (1024). Can you give me hint.

    I tricked the theme using <style type=”text/css”> #sidebar_right{ margin-top:4px;} </style> (to put the sidebar back)

    in the loop.php, and <style type=”text/css”> #sidebar_right{ margin-top:255px;} </style> (to lower the sidebar)

    in the function.php.

    But I think there should be a better way.

    Greetings Sjaak

    Admin

    Syahir Hakim

    #11888

    Not sure I follow what you want to do. Do you mean you have a static front page and would like the slider to appear there in the static front page instead of the blog posts listing page?

    Sjaak

    #11889

    Syahir,

    The home page (Vraag en Antwoord) has the slider (1024) and the posts. The sidebar is now under the slider. See vraagde2ekamer.nl.

    When i now choose a post in the slider, or a tag, category, or a recent post from the sidebar the slider disappears. What I would like to have is that the slider stays in place and the single post will be placed under the slider next to the sidebar

    I hope i am more clear now.

    Greetings, Sjaak

    Admin

    Syahir Hakim

    #11890

    Add this code to your child theme’s functions.php file:

    function graphene_display_slider(){
    if (is_home())
    graphene_slider();
    }

    function graphene_scrollable() {
    $interval = (get_option('slider_speed')) ? get_option('slider_speed') : 7000;
    ?>
    <!-- Scrollable -->
    <script type="text/javascript">
    //<![CDATA[
    jQuery(document).ready(function($){
    $(function() {
    // initialize scrollable
    $("#slider_root").scrollable({circular: true}).navigator({
    navi: ".slider_nav",
    naviItem: 'a',
    activeClass: 'active'
    }).autoscroll({interval: <?php echo $interval; ?>});
    });
    });
    //]]>
    </script>
    <!-- #Scrollable -->
    <?php
    }

    Sjaak

    #11891

    Syahir,

    I already tried this code. The slider will not stay in place when I choose a single post or tag. I removed the wp-chache and put in your code in function.php. Do I have to remove something from the code to make it active?

    Admin

    Syahir Hakim

    #11892

    Oh yes, just remove the codes on line 2:

    if (is_home())

    Sjaak

    #11893

    Syahir,

    Thanks for the help. It works ok. Even better, because now the slider is on all pages.

    Greetings from the netherlands,

    Sjaak

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

You must be logged in to reply to this topic.

Do NOT follow this link or you will be banned from the site!