Changing the default slider height in The Cotton Theme

In this article I will show you how to change the default slider height of the Nivo and Thumbnail sliders to 500 pixels (for different heights you have to change the 500 value with the one you need).

Nivo Slider

To change the default height of the Nivo slider you have to insert the following CSS into the The Cotton Options -> Styles Settings -> Additional Styles section:

#nivo-slider {
height: 500px;
}

If you have automatic image resizing enabled in the Nivo Slider section of the options panel, then you also have to modify the theme’s includes/slider-nivo.php file – you have to change line 44:

$path=pexeto_get_resized_image($imgurl, 950, 350);

to be like this:

$path=pexeto_get_resized_image($imgurl, 950, 500);

 

Thumbnail Slider

To change the default height of the Thumbnail slider you have to insert the following CSS into the The Cotton Options -> Styles Settings -> Additional Styles section:

#slider-img-wrapper, #slider, #slider img {
height: 500px;
}

If you have automatic image resizing enabled in the Thumbnail Slider section of the options panel, then you also have to modify the theme’s includes/slider-thumbnail.php file – you have to change line 37:

$path=pexeto_get_resized_image($imgurl, 950, 350);

to be like this:

$path=pexeto_get_resized_image($imgurl, 950, 500);

 

Was this useful? 0