• 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)
  • Thread Starter benmarshall10488

    (@benmarshall10488)

    I have somehow managed to fix the problem, not sure how (i will leave this open so someone can explain it)
    i read a few more support posts and got this one…
    https://wordpress.org/support/topic/show-homepage-slider-on-all-pages?replies=4

    so first i deleted the code from font-page.php and that didn’t do anything.
    so next i changed the code i had in there for the code posted in that thread. this just gave me a bit of code appearing where the banner should be.
    next i moved the </header> tag to below the code inserted. i had the same bit of code appearing instead of the banner. so i tried to put it back to how i had it before. i moved the </header> tag and put the origonal code back in. magically it worked.
    I don’t know if it was the removing from the frontpage.php file that did it and it was just a cache problem but it all works now.

    please check it out at http://shop.flagbeach.com
    hope my boss likes it enough to allow me to upgrade woocommerce and the theme etc…
    Thanks
    Ben

    The code you posted above is from version pre 1.5.6 when the theme was using a different options panel. Not with version 2.2.4 you would need to copy the code from that version of the theme. This is the being clue: global $smof_data; it should be global $virtue; along with all other calls.

    Kadence themes

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Home page slider’ is closed to new replies.