Home page slider
-
So… this is the last problem i think i have with getting everything working. Thanks guys that have helped so far but…
I have made my woocommerce shop page the landing page by changing the theme settings to static page. I wanted tohave the slider appear on every page so after some google searching found out to copy the following code into the header.php file after the </header> tags and that would work.<?php global $smof_data; ?> <?php if(isset($smof_data['mobile_slider'])) { $mobile_slider = $smof_data['mobile_slider']; } else { $mobile_slider = ''; } if(isset($smof_data['choose_slider'])) { $slider = $smof_data['choose_slider']; } else { $slider = 'mock_flex'; } if(detect_mobile() && $mobile_slider == '1') { $slider = $smof_data['choose_mobile_slider']; if ($slider == "flex") { get_template_part('templates/mobile_home/mobileflex', 'slider'); } else if ($slider == "video") { get_template_part('templates/mobile_home/mobilevideo', 'block'); } } else { ?> <?php if ($slider == "flex") { get_template_part('templates/home/flex', 'slider'); } else if ($slider == "thumbs") { get_template_part('templates/home/thumb', 'slider'); } else if ($slider == "fullwidth") { get_template_part('templates/home/fullwidth', 'slider'); } else if ($slider == "video") { get_template_part('templates/home/video', 'block'); } else if ($slider == "mock_flex") { get_template_part('templates/home/mock', 'flex'); } }?>
The problem is it does not load the slides that i have set in the theme options it only loads the default one you get when you install the theme.
Any ideas how to change this?
Thanks
Ben
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Home page slider’ is closed to new replies.