Support

Account

Home Forums General Issues How to display the custom field content in single product page? Reply To: How to display the custom field content in single product page?

  • Open up the /plugins/woocommerce/templates dir. In there you’ll find content-single-product.php. In there you’ll find Woo actions being called and above each a list of hooks that the action contains. Find the hook that describes the area you want to add your custom fields to, for example woocommerce_template_single_excerpt. Then you Google that hook and on the docs.woothemes.com result you can click the link to ‘Located at’ file. On that page you search for woocommerce_template_single_excerpt. The function you arrive at will tell you the file used is single-product/short-description.php. Now you don’t want to modify this file directly, just like you don’t want to modify the WP core. Instead you copy plugins/woocommerce/templates/single-product/short-description.php to themes/YOURTHEME/woocommerce/single-product/short-description.php. Then you edit that file.

    I’m still working on my first WooCommerce website so I don’t know if this is the fastest way to find the template part you need but this is how I’m doing it.