Setting up Cloud9 Carousel for the first time

All right. Now is the time to add my much loved 3D carousel using Cloud9Carousel. Surprisingly the process was straightforward. Pity no CDN has been provided for the script and I had to download it to my theme.

I think I’d better include the jQuery script inside my plugin so in the future as soon as I activate the plugin the script gets included.

Done! the only pity is that I cannot enqueue style as well because the style might not be suitable for all situations. – note to myself: separate the style into two styles, one very general and using dynamic CSS for the plugin and the other for each website. –

Another problem is the size of the image. If I use everything except WordPress thumbnail the size would be full and the width to height ratio – what was the correct terminology? – furthermore, the size would be too large and unless I resize them before uploading them the images would be very heavy. would be the same of the original image and as the result, the slide wouldn’t look nice. If I use the default thumbnail size of WordPress the ratio would be fine but the image would be cropped to center which isn’t what I want. I want it to be cropped from the bottom.

One solution given is using add_image_size. I added the following to my functions.php and as instructed installed and activated the “Regenerate Thumbnail” plugin and ran it.

add_image_size( 'sites-thumbs', 300, 300, array('top') );

The problem with the small size of the thumbnail was solved but the crop from the top is ignored. Let try some different terms to see what happens. I put “left” instead but it didn’t make any difference. Then I modified it exactly like the example provided on the WordPress here.

And finally, it is fine

add_image_size( 'sites-thumbs', 300, 300, array('center','top') );

Leave a Reply

Your email address will not be published. Required fields are marked *