Where are you pasting that code?
The code snippet needs to be put in the right spot.
So you need to copy the content-product.php template from the woocommerce plugin folder and place it in your theme folder in a “woocommerce” folder.
Then paste that code within the Loop.
Updated Answer:
Okay so I believe that you need to use the get_post_custom function.
Take note of the Name of your custom field. Then we can something like this to output the results:
<?php
$custom_fields = get_post_custom($post->ID);
$my_custom_field = $custom_fields["Name of your Field"];
foreach ( $my_custom_field as $key => $value ) {
echo "<strong>$key: </strong> $value <br />";
}
?>
Related Posts:
- how to override woocommerce specific loop or archive-product.php [closed]
- Get all products with a custom attribute
- pagination in woocommerce order history page
- Show attribute description when filtering by that attribute
- Create a Custom menu item fetched by Product Categories and Sub Categories
- Disable email field on WooCommerce customer account details
- Show post page only if the user has bought a specific product
- redirect product-category to a custom page
- Woocommerce Product page edit
- Setting up Different Layouts for Each Product Category and Subcategory [closed]
- How to redirect WooCommerce shop URL?
- Send a custom WooCommerce email when custom order change [closed]
- Change WooCommerce product price based on category and GEO IP country
- Automatically Update Woocommerce Prices [closed]
- Add custom field to woocommerce variations [closed]
- how to get the categories for a single product in a hierarchical way
- Viewing checkout page removes fees from mini cart
- woocommerce_checkout_fields modifying existing billing_phone label created new field
- How to add an extra button on woocommerce shop page and use it to send the product info with image in a mail? [closed]
- how do I remove the shipping from woocommerce thankyou page and from the email
- Woocomerce custom billing address fields display in order details [closed]
- Color swatches on category page? [closed]
- help to change some colors (woocomerce and store locator) [closed]
- No shipping method has been selected [closed]
- Changer numbers of columns in woocommerce shop
- Woocommerce product permalink not working
- “woocommerce_form_field()” function having issues after latest woocommerce update [closed]
- How to customize shipping region/states on WooCommerce
- Rename WooCommerce sorting dropdown options [closed]
- WooCommerce custom billing fields on email address
- Woocommerce custom checkout form
- Woocommerce custom field calculation
- Hiding Short Description in Shop Page, WooCommerce
- wordpress shortcode not working
- I found this code to be very useful, how can I change it to a text that display “Product versions and period of last update” rather than a button?
- Customizing woocommerce product page
- Woocommerce custom archive page custom content and shortcode
- WP_Query – sort the results by meta value custom attribute wocoomerce
- customer specific email attachment
- Style WooCommerce Product Search Widget
- Product page not found if product data is set Appointment Service
- Query Product categories what have a custom field
- How to get the full product name by ignoring custom modification on it
- where is admin footer?
- Woocommerce custom “My Account” Tab – Add Save button
- Need to add custom text field to Woocommerce under add to cart button
- Moving Quantity after product description
- Custom product status get filtered on all product list views
- Can we add an extra button on woocommerce shop page and use it to send the product info including image in a mail?
- Upload advanced custom field text link array with csv
- Woocommerce – Remove cart button depending product (post) status
- WordPress Performance and bulk edits
- I want to use a product thumbnail completely different than the product image
- Including a Customized Initialize File with a wordpress header
- Send default WooCommerce email when switching from custom order status
- How to Remove wpautop in woocommerce includes folder class-wc-order-item.php
- WooCommerce – Adding custom HTML to specific product pages
- How do I change text of a product template in a WooCommerce theme? [closed]
- WooCommerce customise checkout billing form [closed]
- Integrate Woocommerce to a custom theme
- woocommerce display product category on checkout page [closed]
- Save And Display Mp3 Audio files on WooCommerce product page with Dokan
- Change the User/ Author of the Products
- Show total sales for each products on search results page Woocommerce
- Change in credit card payment button for woocommerce
- How to display product variations on same row
- Custom product sorting archive page
- Rearrange elements outputted by comment_form()
- How to build custom WP admin with custom URLs
- Custom editor field displaying HTML in Visual editor
- generate unique number when registering a user
- How to set default values for options page
- How to remove query string from static resource in WordPress?
- Manually add order item with fixed product_id in WooCommerce
- Does all editing of WordPress occur within the dashboard, or can we use our own text editor?
- Control Content On Non-Blog Pages
- How Can I Move Data From Form 1 To Form 2
- How to get Related Custom Posts?
- Background image not appearing
- get author in blog posts?
- Display specific Taxonomy Term from Custom Post Type
- Widget title markup in register_sidebar
- Garbage in uploads folder
- What is theme-editor.tmp?
- Remove welcome panel from contact form 7 page [closed]
- I want to filter my products with attributes [closed]
- Get custom field value from not-current page
- RSS feed showing deleted post
- Custom page template, not acting as page
- how or where wordress collect unlogged user session
- Automatic recurring payment using YITH subscription and Dokan Stripe
- Customizer options limited to specific user roles?
- I want to fusion the product columns in email table order
- WordPress Using Zip code customer shop find without woocommerce plugin
- Embedded Options in a Custom Metabox
- How do I display entries in the top menu based on conditions selected in the sidebar menu?
- custom loop issue
- Bulk product editing in wordpress
- Search results load individual post in slide out div
- Conditional tag