WordPress.org

Support

Support » Themes and Templates » Virtue » Show homepage slider on all pages?

Show homepage slider on all pages?

  • Hi,

    I would like to know if it is possible to show the homepage slider on all pages (as a header). I see I can show an image on all pages, but the option for the slider doesn’t seem to be so easy.

    I tried the solution here but didn’t have any luck.

    You can view the work-in-progress website here

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author Kadence Themes

    @britner

    The link to the other support form is close. the code just changed a bit since them. Now you can add this just before the header close:

    <?php  global $virtue; ?>
    			<?php if(isset($virtue['mobile_switch'])) {
    				$mobile_slider = $virtue['mobile_switch'];
    			} else {
    				$mobile_slider = '';
    			}
    			if(isset($virtue['choose_slider'])) {
    				$slider = $virtue['choose_slider'];
    			} else {
    				$slider = 'mock_flex';
    			}
    			if(detect_mobile() && $mobile_slider == '1') {
    		 		$slider = $virtue['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');
    				}
    }?>

    And you will want to remove that from the font-page.php

    Thanks for your quick reply.
    I have removed from front-page.php and it has removed the slider, but unfortunately, adding the above code in the header.php has not reinstated it…
    I placed it just before </header> – could you please let me know what else I could try?

    Thanks

    Theme Author Kadence Themes

    @britner

    You can send me admin access via email and I can take a look.

    ben@kadencethemes.com

    Kadence Themes

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Show homepage slider on all pages?’ is closed to new replies.
Skip to toolbar