Keep slider on the home page
-
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
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?
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
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
}Admin
Oh yes, just remove the codes on line 2:
if (is_home())
Viewing 7 posts - 1 through 7 (of 7 total)
- You must be logged in to reply to this topic.