WordPress.org

Ready to get started?Download WordPress

Forums

Responsive WordPress Slider - Soliloquy Lite
[resolved] Multiple Slideshows (5 posts)

  1. robahas
    Member
    Posted 1 year ago #

    Hi - The documentation suggests that multiple slideshows are possible with the free version (is that right?). But I can only make one work. In the following code the first one works, the others never appear:

    if (is_page(5)) { soliloquy_slider( '7' ); }
    elseif (is_page(9)) { soliloquy_slider( '20' ); }
    elseif (is_page(11)) { soliloquy_slider( '22' ); }
    elseif (is_page(12)) { soliloquy_slider( '24' ); }

    Thanks!

    http://wordpress.org/extend/plugins/soliloquy-lite/

  2. WP Sites - Brad Dalton
    Member
    Posted 1 year ago #

    You will need to create multiple sliders.

    On top of this, you'll need to enter the page i.d for each in the code as well as the i.d for each slider.

    Here's some code i tested for 4 different sliders displaying on different pages.

    function wpsitesdotnet_multiple_soliloquy_sliders() {
    if (is_home() ) soliloquy_slider( '11444' );
    elseif (is_page(11449)) soliloquy_slider( '11458' );
    elseif (is_page(11450)) soliloquy_slider( '11461' );
    elseif (is_page(11451)) soliloquy_slider( '11463' ); 
    
    };
    /**
    * @author Brad Dalton - WP Sites
    * @link http://wpsites.net/
    **/
    add_action('genesis_header','wpsitesdotnet_multiple_soliloquy_sliders');

    This code assumes you're using the Genesis framework and want to output your slider in the header using the genesis_header hook.

    The hook position, conditional tags and i.d's for pages and sliders can all be changed to suit your needs.

  3. robahas
    Member
    Posted 1 year ago #

    Hi Brad - Thanks. it sounds like you are saying that my code should work :0)

    Still... it doesn't. Well thanks for confirming that this is possible. I guess there is something wrong with my implementation.

  4. WP Sites - Brad Dalton
    Member
    Posted 1 year ago #

    Hello Rohahas. Yes. Depends on which theme you're using. Where did you put that code? You should never put code in your parent themes template files. All customization should be done in the child themes functions.php file as seen in my code above which works perfectly.

    The difference between customizing a free theme and a design framework are huge. My code uses a header hook whereas most free theme don't offer hooks which makes it harder to modify and customize WordPress.

  5. robahas
    Member
    Posted 1 year ago #

    Thanks Brad - This is my own custom theme. I got it working. All my fault :0)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.