• Resolved oheijo

    (@oheijo)


    I’m using the cpt bootstrap carousel plugin to display a bootstrap carousel on my site. In my functions.php file, I created a custom image size and I would like to display the images in the carousel only in this size. Can someone help me how to customize the plugin to display custom image sizes? I can’t get them to work.

    https://wordpress.org/plugins/cpt-bootstrap-carousel/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Phil Ewels

    (@tallphil)

    Hi oheijo,

    The plugin uses the full thumbnail size with the get_the_post_thumbnail() function (see code).

    This unfortunately makes it difficult to set the image size using wordpress image sizes. Usually this isn’t a problem, as you can resize the carousel with CSS (for an example, see this support thread).

    I can see the advantage of using wordpress thumbnail sizes though, so I’ve added this as an issue on github. I’ll look into having a carousel setting where you can choose which image size to use for a future release. In the mean time you can edit the hardcoded thumbnail size string on the line of code referenced above (line 556). You can then specify that size using add_image_size().

    I hope that all makes sense – let me know if I can help further.

    Phil

    Plugin Author Phil Ewels

    (@tallphil)

    Hi oheijo,

    I’ve just added this feature to the plugin and pushed a release. It should come through shortly – I hope it works ok for you.

    Cheers,

    Phil

    Thread Starter oheijo

    (@oheijo)

    Hi Phil,

    Thank you very much, looking forward to the release!

    Heijo

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Displaying custom image size in carousel’ is closed to new replies.