Support » Plugin: Fullscreen Slider » Load slider on only one page

  • Resolved DaisyDesigner

    (@daisydesigner)


    I, like others, am having trouble getting the slider to only show on one page (in this case, the homepage). The slider is, in general, perfect for what I need. But I can’t for the life of me figure out how to get it to just show on one page. I did the code editing work around in the first time this was asked (adding the “if ( is_front_page() )” or whatever it was, and it didn’t work! It either didn’t show my slideshow at all, or it continued to show on every page (I tried it a couple times).

    I am using the Dynamik Website Builder for Genesis, and so I made my own conditional that I inputted into the same “if” statement (in this case, I told it to load only on pages with the label “landing”). This caused it to completely stop working.

    In another question, the developer said this option would be adding in an update in “a week or two” but that was 6 months ago! PLEASE help us figure out how to solve this problem. It is the most requested support topic on this. To the developer or anyone else, please help.

    I am unable to show a link to my site because I am working on it locally.

    https://wordpress.org/plugins/fullscreen-slider/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter DaisyDesigner

    (@daisydesigner)

    So I figured out a simple, CSS work around that isn’t elegant by any means, but it will work.

    Go to the individual pages that you do NOT want the slider to appear on. Now, for myself, I had an option at the bottom of this page for “Scripts” and I am not sure if that’s from WordPress or my specific theme/framework (Dynamik Theme for Genesis Framework). If you have that option, great, if not, go to where you usually input content and select the “Text” tab from the top right corner.

    In the Script or Text section, input the follow:

    <style>
    #fs-slider-container {
    display:none;
    }
    </style>

    And there you go, just do that on each page you don’t want the slider to appear. If you have a lot of pages, I imagine you can put the following in your main CSS:

    #fs-slider-container {
    visibility: hidden;
    }

    Then on the single page you want to display the slider, add the code:

    #fs-slider-container {
    visibility: visible;
    }

    Yet another ugly option, but better perfromance & less work
    is to change the plugin code… (yes I know the cost, but
    canibalizing the theme & increasing *each* page load time is not better)

    ** to get the slider on home page only! **
    Modify the file plugins/fullscreen-slider/class-fs-slider.php, line: 134.
    Just add || !is_home() as I did below:

    public function display_slider() {
    	// if no slides are present than exit
    	if ( empty( $this->slides ) || is_admin() || !is_home()) {
    		return;
    	}

    ** to get the slider on other pages **
    Just rewrite the condition to proceed on those pages.

    ** Finally **
    Wait for this feature to be added at the front door…

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