Showing posts with label Use same slider but with different start slide. Show all posts
Showing posts with label Use same slider but with different start slide. Show all posts

Thursday, June 6, 2013

[Help Wordpress] Use same slider but with different start slide


Hi Dmitry,


I included the 2 lines of PHP code, and changed the $init_codes array:
$init_codes[0] = str_replace('startSlideId:0', 'startSlideId:2', $init_codes[0]);


I checked with print_r and the startSlideId is now set to 2. So far so good, but when the jQuery initialisation is called later on the page the startSlideId is still set to 0:



How can I fix this?


Thank you, Jeroen.



.

help.dimsemenov.com

Wednesday, June 5, 2013

[Help Wordpress] Use same slider but with different start slide


Use same slider but with different start slide



Hi,


Add such code somewhere after slider shortcode (or PHP function call):



// Init code
include_once(ABSPATH.'wp-content/plugins/new-royalslider/classes/NewRoyalSliderMain.php');
$init_codes = NewRoyalSliderMain::$sliders_init_code;


$init_codes is an array that holds initialization string for each slide on page. You may change/add options via simple string manipulations like str_replace. e.g. if your slider ID is 6, so you can get your string like so:



$init_codes[6] = str_replace($init_codes[6], 'startSlideId:10', `startSlideId:5`);

Dmitry



.

help.dimsemenov.com

Search

Other post