Vishit Shah
Vishit Shah

Reputation: 13

How to create a custom datepicker field product in backend?

I wanted to add date picker custom filed individual product in backend and that filed save in database also so please give me suggestion for that as soon as possible.

Upvotes: 1

Views: 4611

Answers (1)

KTrivedi
KTrivedi

Reputation: 141

You can use this plugin for creating datepicker custom field in products section

https://wordpress.org/plugins/woocommerce-custom-product-data-fields/

And if you want to display other custom fields without plugin then use this documentation

http://www.remicorson.com/mastering-woocommerce-products-custom-fields/

    Hello Vishit Following code will display content of post meta in template file or anywhere where you want to display For Example :

    <?php if ($company_v=get_post_meta( get_the_ID(), 'company_v', true ) ) :  ?>
  <i class="fa fa-graduation-cap"></i><span>
<?php if($company_v) { echo $company_v; } ?></span>
<?php endif; ?>

Upvotes: 1

Related Questions