Ticket: #218771 Status: OPEN Average Speed: 7.9 Minutes
public

Note: All average response time from this ticket will also be acquired by this person.

Cancel

“Royal Slider”

  • Frederik Lightmann

    Hi,

    one more question, i have bought the royal slider pluging, is it possible to set the plugin slideshow for my home page so i would have more option about text effects ect..?

    THANKS!

    12:30 on May 22, 2014

  • Ruben

    Hi

    Unfortunately no, it's not that simple - to just plug and play your custom slider. The theme uses certain parameters to work with the included slider. But if you know your way around PHP/JS you could try..

    Use the child theme and redeclare the krown_hero() function. Look into the functions.php to understand how the slider is created. At line 907 you see how the slider starts and it creates itself after the given elements. I guess that you could scrap that code and output the Royal Slider's code or something (maybe you a custom field to pass the parameter).

    I haven't tested what i wrote above, but with a bit of tweaking it might work (though i'm not sure about resizing and such), but you can try my suggestions.

    Regards,
    Ruben.


    12:30 on May 22, 2014

  • Frederik Lightmann

    Hi,

    i only would need one page (my home page) with an plugin slider all other are fine with the theme roayal slider, maybe i can duplicate the modular template, give a other name and set there the plugin slider?

    THANKS!

    12:30 on May 22, 2014

  • Ruben

    The same.. Use the child theme and the mentioned function and do a check for your page id. For example, something like this:

    [...]
    
    case 'slider':
    
      if ( $post_id == '456' ) { //or whatever post/page id you have there 
    
          $hero_el .= 'Don't know .. PHP Output of the Royal Slider plugin';
    
      } else {    
    
         // Custom slider
         $slides = get_post_meta( $post_id, 'krown_hero_slider', true );
         [ .... ]
    
      }
    
      break;
    
    [...]

    12:30 on May 22, 2014

  • Frederik Lightmann

    Great, it works fine ;-)

    Thanks you!!!!!

    12:30 on May 22, 2014

  • Ruben

    You're welcome! :)

    12:30 on May 22, 2014

  • Frederik Lightmann

    Sorry, one more question, how can i set on the default slider autostart and maybe all 5sec. slide to next image?

    Thanks!!

    12:30 on May 22, 2014

  • Ruben

    Check out the scripts file (main.js) - line 445:

    $(".hero-module .royalSlider").royalSlider({

    There's where the slider initializes. Simply modify the javascript parameters after your own needs.

    12:30 on May 22, 2014

  • Frederik Lightmann

    I'm not sure which parameter i have to set?

    autoPlay: true,
    delay: 3000,

    ?


    12:30 on May 22, 2014

  • Ruben

    Read the documentation here:

    http://dimsemenov.com/plugins/royal-slider/documen...

    However, i am not sure that what you're after is a featured included in the Royal Slider.. Are you sure that the plugin offers autoplay? Because it's not in the options list..


    12:30 on May 22, 2014

  • Ruben

    Scrap that .. Here's another link:

    http://dimsemenov.com/plugins/royal-slider/documen...


    12:30 on May 22, 2014

  • Frederik Lightmann

    yes i read it, but i'm not sure what i have to do, write new lines...!??

    Autoplay

    Autoplay slideshow can be enabled via slider options. Delay between items can be set globally via delay option, or specifically for each item by adding data-rsDelay="1000" to root element of the slide (1000 = 1sec).

    Variable Default Value Description
    enabled false Enable autoplay or not.
    stopAtAction true Stop autoplay at first user action.
    pauseOnHover true Pause autoplay on hover.
    delay 3000 Delay between items in ms.

    Example of slider with autoplay options:

    jQuery(document).ready(function($) {
        $(".royalSlider").royalSlider({
        	// general options go gere
        	autoScaleSlider: true,
        	autoPlay: {
        		// autoplay options go gere
        		enabled: true,
        		pauseOnHover: true
        	}
        });  
    });

    Example of slide specific delay:

    <div class="royalSlider">
        <!-- slide with any content -->
        <div data-rsDelay="2000">
            <img class="rsImg" src="image1.jpg" alt="This text will be IGNORED!" />
            <figure class="rsCaption">This caption <b>HTML</b> text will be used.</figure>
        </div>
    </div>

    12:30 on May 22, 2014

  • Ruben

    Yes, you need to write new lines if you want to modify how's the theme working. I wrote about line 445, there's the initialization of the royal slider. Simply add the autoplay property there, as instructed in the document i've sent you.

        	autoPlay: {
        		// autoplay options go gere
        		enabled: true,
        		pauseOnHover: true
        	}
    

    12:30 on May 22, 2014

  • Frederik Lightmann

    If i write it, i get always error's, sorry but i have no plan where and hwo i have to but this lines of code..

    12:30 on May 22, 2014

  • Ruben

    Here's an example with the entire block:

    $(".hero-module .royalSlider").royalSlider({
        keyboardNavEnabled: true,
        autoScaleSlider: true,
        controlNavigation: 'none',
        slidesSpacing: 0,
        minSlideOffset: 0,
        imageScaleMode: 'fill',
        loopRewind: $body.hasClass('sldr-loop') ? true : false,
        autoScaleSliderWidth: 1920,     
        autoScaleSliderHeight: 950,
        autoPlay: {
            enabled: true,
            pauseOnHover: true
        }
    });

    12:30 on May 22, 2014

  • Frederik Lightmann

    if i put this lines in i get error and nothing work :-(

    12:30 on May 22, 2014

  • Ruben

    Send me a link..

    12:30 on May 22, 2014

  • Frederik Lightmann

    Upps, now it works, i fogot to set the "," 

    MANY THANKS!

    12:30 on May 22, 2014

  • Ruben

    You're welcome! :)

    12:30 on May 22, 2014

Updating...