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.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
🗓️ Just one more day until the next session of ACF Chat Fridays! Make sure to register for the latest updates on what’s coming in ACF 6.1!— Advanced Custom Fields (@wp_acf) March 30, 2023
📆 Friday 31st March 3pm UTC
👉 Register here - https://t.co/3UtvQbDwNm pic.twitter.com/7xtEJakeQN
© 2023 Advanced Custom Fields.