1. Home
  2. WC Vendors Pro
  3. How To
  4. Custom Product Edit Templates
  1. Home
  2. WC Vendors Pro
  3. Custom Product Edit Templates

Custom Product Edit Templates

Introduced in version 1.4.0 you can create your own custom product templates. If you have different kinds of products that you would like to provide custom templates for you can now add multiple templates to your themes template overrides. This means that if you have an auction or booking product you can create custom product edit forms for these. The product edit buttons for these custom forms will be automatically added to the product screen in the dashboard.

All you have to do is name the template product-{customname}.php. You can also add a label template tag to change the button label. Otherwise the button label is generated based on the customname. 

For Example 

Two new files have been added to our themes custom template overrides with the following names

  • product-mynewtemplate.php

The source for this custom template is available here: https://gist.github.com/digitalchild/fe5eaf3b1a2906e76ec60502d6d6a9cb

This will output the following add product buttons.

 

 

 

Updated on March 16, 2019

Was this article helpful?