WordPress.org

Ready to get started?Download WordPress

Forums

Virtue
Show homepage slider on all pages? (4 posts)

  1. littlebizonline
    Member
    Posted 4 months ago #

    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

  2. Kadence Themes
    Member
    Theme Author

    Posted 4 months ago #

    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

  3. littlebizonline
    Member
    Posted 4 months ago #

    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

  4. Kadence Themes
    Member
    Theme Author

    Posted 4 months ago #

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

    ben@kadencethemes.com

    Kadence Themes

Reply

You must log in to post.

About this Theme

About this Topic