Slideshow Options

by on May 9, 2011  •  In Tutorials

As of version 1.0.1, Arturo comes with three jQuery slideshows pre-installed. By default, the front page will display the Faderota slideshow, which fades from one image to the next. You can easily change this to the Scrollerota or Sliderota slideshow by just adding a simple piece of code to the Custom Actions editor.

Here is the arturo_slideshow() code and all of its arguments:

$args = array(
	'type' => 'faderota',
	'cat' => '',
	'postnum' => 4,
	'width' => theme_option('content_width'),
	'height' => 260,
	'excerpt' => 35
);
arturo_slideshow($args);

Every argument can be customized for your needs. Here is the block of code I used to change the demo to display the Scrollerota slideshow:

remove_action('arturo_index_top', 'arturo_index_top_slideshow');
add_action('arturo_index_top', 'new_index_top_slideshow');
function new_index_top_slideshow() {
   global $paged;
   $args = array(
      'type' => 'scrollerota',
      'cat' => '1'
   );
    if(is_home() && $paged < 2) arturo_slideshow($args);
}

Notice that I have added a conditional statement that will only display the slideshow on the front page and no subsequent pages.

If I would have wanted to add the Sliderota plugin instead, it would have looked like this:

remove_action('arturo_index_top', 'arturo_index_top_slideshow');
add_action('arturo_index_top', 'new_index_top_slideshow');
function new_index_top_slideshow() {
   global $paged;
   $args = array(
      'type' => 'sliderota',
      'cat' => '1'
   );
    if(is_home() && $paged < 2) arturo_slideshow($args);
}

Tags: ,

About

c.bavota is a web developer from Montreal. He runs bavotasan.com and Themes by bavotasan.com. Every once in a while you will see him floating around cyberspace.

http://bavotasan.com

Leave a Reply


BUY NOW
Select a theme: