Firstly, i would use a custom function in your child themes functions file rather than add the code directly to the template file.
You can use the WooCommerce conditional tags and hooks in your code.
echo get_post_meta( get_the_ID(), 'collection_text', true );
Related Posts:
- How can i force Display names to be the same as Usernames?
- Adding Custom Fields for Img in Posts
- Edit Imported advanced Custom Fields from wordpress Dashboard
- Add custom meta box on Post page
- how to display all posts Custom fields dynamically?
- How to get custom field image url of specific size
- add_meta_box Callback not being called
- Custom options page checkbox will not save, despite working with text
- Datepicker not supporting timepicker
- Upload files programmatically to users
- How to create Repeater fields using Advanced Custom Fields?
- How can I filter the contents of a metafield before it’s displayed in the admin?
- Plugin not saving values when placed in a folder within /wp-content/plugins
- Security checking in meta_box save is reluctant?
- Make the checkbox meta field checked by default
- Last modified field for user profile?
- WordPress CMB2 – Run function on save
- FacetWP group listings by custom field [closed]
- how do i remove posts from a WP_Query so the pagination is right?
- Custom Field Template seriously messed up in WP 3.1.1
- Carbon Fields use in custom plugin class
- UnWanted Custom field added in the wp page edit area
- Implement Autocomplete for a custom field on WordPress Plugin Frontend
- How to query the custom fields by language?
- Creating a custom post type, adding custom meta fields, preventing all future editability of posts of this type
- auto populate list of questions if user select a category xyz
- is there a way to link one of the field in ACF field group, to a field in a media attachment page? [closed]
- How do I hide posts across all loops based on the value of a custom field?
- Execute js files doesn’t seem to work
- WordPress metaboxes – textfield suggestion automatically populated
- Char limit on custom blog-post form? [closed]
- Custom Post Type Fields
- How do I enforce users to fill a determined custom field using WyPiekacz?
- Adding class to last list item? Not WP generated
- How do we update a custom file upload field with the Advanced Custom Field plugin?
- Order posts by meta key ( Using ACF )
- How to add fields in the WordPress editor?
- WordPress function to add text warning on every pages [closed]
- How to add an extra, independent set of custom fields?
- Price comparison table based on Custom Post Type?
- Show related posts based of current ACF field name in a single page post (a loop within loop)
- Woocommerce – Change Variable Product Add to Cart to behave like external product using Custom Field (link) [closed]
- Custom Fields for Page Edits
- “After file loaded” action
- How can I add user profile fields to my mailpress mailout
- Dictionary-style definition list plugin
- Adding custom Field To The Posts Listing
- How to create repeater field manually, without plugin (ACF Pro)?
- Creating New Dynamic Fields for a Certificate (Number Generation, Code Referencing, and more)
- WordPress Phone Field Check (use numbers, spaces and pluses)
- Can export gallery but can’t import it Wp all import
- Table of contents (TOC) plugin is not showing header tag
- Auto populate a user custom field from another user custom field
- Best approach to make all tags searchable by the wordpress search function
- need to find duplicated meta value in custom filed and view the posts that have the same value
- Create a pdf from the entries in DB
- how to find out which plugin disable custom field for post
- Preset custom fields
- What database state changes happen after a post is manually “updated” with no changes?
- get_post_meta shortcode returns empty field
- custom fields not displaying on wordpress site
- WordPress hide post from custom post-type on a single page
- Create multiple posts when a custom post is created
- Why Custom fields description is not working WordPress Version 5.4.2?
- Problem Advanced Custom Fields PRO
- Meta Key array building with multiple input values from fields
- Get all user meta_keys and then group users by matching values
- Custom product page’s style for printing
- Custom plugin issue – Notice: Trying to get property of non-object in
- How to get post that has non zero or greater than zero meta value
- How can I call functions from a custom plugin?
- Creating Nested custom fields
- Create Biographies
- WordPress doesn’t save a post revision when changing CMB2 custom fields
- Do something with thumbnail image on post publish
- How to add wordpress plugins in along with my standalone theme
- How to Save settings of custom tab product page in admin side in a database?
- Changing the body of mail sent to new user registration
- Add new post using a page inside the website
- Synch Custom Post Types (and Custom Fields, Cats, etc.) Between WordPress Sites
- WordPress Meta Query: Relation is not working correctly
- How can i do custom author list?
- force category table refresh when adding new category
- Is there a way to add a custom input field for every taxonomy term in WP post editor?
- Advanced Custom Fields Plugin – not displaying images
- get_post_meta does not work
- Converting a themes featured image to WordPress featured image
- Trying to use Advanced Custom Fields with custom image sizes
- A plugin for software reviews site like this one?
- Integrating WordPress Content into a jQuery Slider
- Outputting custom field query from a plugin to the website header
- Render CMB2 select option to post page [closed]
- Links not opening as they should. Custom WP plugin
- Order custom post type by posts with most likes first
- additional fields based on the quantity of products selected
- WordPress additional update of publications after importing WP All Import Pro
- What is the easiest way to create a custom field archive?
- I am trying to add form using ACF plugin and acf_form() function, but my user fields dont show up properly
- Need to add custom cart item data
- Fields are not displayed on front end under custom php code in Advanced Custom Fields and Flexible Content field WordPress