WP Carousel Pro

  1. Home
  2. Docs
  3. WP Carousel Pro
  4. How To Override Templates

How To Override Templates

WordPress Carousel Pro supports template overrides from a theme. That means you can customize the appearance of the plugin-specific designs. The overridable files are located in the templates folder. For your convenience, we have created a hierarchy-

wp-carousel-pro/
├── languages
├── src
│ ├── Admin
│ ├── Frontend
│ │ ├── templates
│ │ │ ├── loop
│ │ │ │ ├── content-type
│ │ │ │ │ ├── content.php
│ │ │ │ ├── external-type
│ │ │ │ │ ├── feeds.php
│ │ │ │ ├── image-type
│ │ │ │ │ ├── caption.php
│ │ │ │ │ ├── image.php
│ │ │ │ ├── mix-content-type
│ │ │ │ │ ├── audio.php
│ │ │ │ │ ├── content.php
│ │ │ │ │ ├── image.php
│ │ │ │ │ ├── video.php
│ │ │ │ ├── post-type
│ │ │ │ │ ├── content.php
│ │ │ │ │ ├── meta.php
│ │ │ │ │ ├── social-share.php
│ │ │ │ │ ├── thumbnails.php
│ │ │ │ │ ├── title.php
│ │ │ │ ├── product-type
│ │ │ │ │ ├── add_to_cart.php
│ │ │ │ │ ├── content.php
│ │ │ │ │ ├── image.php
│ │ │ │ │ ├── name.php
│ │ │ │ │ ├── price.php
│ │ │ │ │ ├── ratting.php
│ │ │ │ ├── video-type
│ │ │ │ │ ├── caption.php
│ │ │ │ │ ├── image.php
│ │ │ │ ├── content-type.php
│ │ │ │ ├── image-type.php
│ │ │ │ ├── mix-content-type.php
│ │ │ │ ├── post-type.php
│ │ │ │ ├── product-type.php
│ │ │ │ ├── video-type.php
│ │ │ ├── carousel.php
│ │ │ ├── grid.php
│ │ │ ├── justified.php
│ │ │ ├── masonry.php
│ │ │ ├── pagination.php
│ │ │ ├── preloader.php
│ │ │ ├── section-title.php
│ │ │ ├── thumbnails-slider.php
│ │ │ ├── tiles.php
│ ├── Includes
├── vendor

So all the files mentioned above can be overridden by your theme directory.

Steps to override the template of WordPress Carousel Pro:

  1. Make a folder named wp-carousel-pro” in your active theme. (It is better to create the folder in your active child theme)
  2. Create another folder inside the wp-carousel-pro” and name it templates”.
  3. Copy the template you want to override from the plugin’s templates folder.
  4. Paste the template file in the wp-carousel-pro > templates folder inside your active theme.
  5. Now open the file in a text editor/code editor and edit it as you like.
  6. Now reload the page from the browser and see the changes you made.

Say, for example, I want to override the carousel.php file through my child theme.

Here Noteworthy: it’s highly recommended to override the file through the child theme instead of the main theme. Otherwise, the file customization will get reverted to the original once any theme update happens.

So to override the carousel.php file, you have to copy the file from

/wp-content/plugins/wp-carousel-pro/public/templates/loop/carousel.php

and paste it into your child theme directory

/wp-content/themes/twentytwenty-child/wp-carousel-pro/templates/carousel.php

Then modify the file content as you want.