WooCommerce Product Slider Pro

  1. Home
  2. Docs
  3. WooCommerce Product Slider Pro
  4. How To Override Templates

How To Override Templates

WooCommerce Product Slider 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-

woo-product-slider-pro/
├── language
├── src
│ ├── Admin 
│ ├── Frontend
│ │ ├── assets
│ │ ├── views
│ │ │ ├── partials
│ │ │ ├── templates
│ │ │ │ ├── cat-loop/
│ │ │ │ │ ├── theme
│ │ │ │ │ │ ├── theme-one.php
│ │ │ │ │ │ ├── theme-two.php
│ │ │ │ ├── product-loop/
│ │ │ │ │ ├── theme
│ │ │ │ │ │ ├── theme-one.php
│ │ │ │ │ │ ├── theme-two.php
│ │ │ │ │ │ ├── theme-three.php
│ │ │ │ │ │ ├── theme-four.php
│ │ │ │ │ │ ├── theme-five.php
│ │ │ │ │ │ ├── theme-six.php
│ │ │ │ │ │ ├── theme-seven.php
│ │ │ │ │ │ ├── theme-eight.php
│ │ │ │ │ │ ├── theme-nine.php
│ │ │ │ │ │ ├── theme-ten.php
│ │ │ │ │ │ ├── theme-eleven.php
│ │ │ │ │ │ ├── theme-twelve.php
│ │ │ │ │ │ ├── theme-thirteen.php
│ │ │ │ │ │ ├── theme-fourteen.php
│ │ │ │ │ │ ├── theme-fifteen.php
│ │ │ │ │ │ ├── theme-sixteen.php
│ │ │ │ │ │ ├── theme-seventeen.php
│ │ │ │ │ │ ├── theme-eighteen.php
│ │ │ │ │ │ ├── theme-nineteen.php
│ │ │ │ │ │ ├── theme-twenty.php
│ │ │ │ │ │ ├── theme-twenty-one.php
│ │ │ │ │ │ ├── theme-twenty-two.php
│ │ │ │ │ │ ├── theme-twenty-three.php
│ │ │ │ │ │ ├── theme-twenty-four.php
│ │ │ │ │ │ ├── theme-twenty-five.php
│ │ │ │ │ │ ├── theme-twenty-six.php
│ │ │ │ │ │ ├── theme-twenty-seven.php
│ │ │ │ │ │ ├── theme-twenty-eight.php
│ │ │ │ │ ├── add_to_cart.php
│ │ │ │ │ ├── content.php
│ │ │ │ │ ├── out-of-stock-ribbon.php
│ │ │ │ │ ├── price.php
│ │ │ │ │ ├── rating.php
│ │ │ │ │ ├── sale-ribbon.php
│ │ │ │ │ ├── thumbnail.php
│ │ │ │ │ ├── title.php
│ │ │ │ │ ├── view_detail_button.php
│ │ │ │ ├── category-carousel.php
│ │ │ │ ├── pagination.php
│ │ │ │ ├── preloader.php
│ │ │ │ ├── product-carousel.php
│ │ │ │ ├── product-carousel.php
│ │ ├── Frontend.php
│ │ ├── Helper.php
│ ├── Includes 
├── vendor

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

Steps to override the template of WooCommerce Product Slider Pro:

  1. Make a folder named woo-product-slider-pro” in your active theme. (It is better to create the folder in your active child theme)
  2. Create another folder inside the woo-product-slider-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 woo-product-slider-pro > templates folder inside your active theme.
  5. Now open the file in a text 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 content.php file, you have to copy the file from

/wp-content/plugins/woo-product-slider-pro/src/Frontend/views/templates/product-loop/

theme/content.php

and paste it into your child theme directory

/wp-content/themes/twentytwenty-child/woo-product-slider-pro/templates/product-loop/

theme/content.php

Then modify the file content as you want.