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
- How can I show drafts in wp_dropdown_pages list?
- How can I save repeatable fields with one value inside an array?
- 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
- Advanced Custom Fields query
- Custom options page checkbox will not save, despite working with text
- Datepicker not supporting timepicker
- Upload files programmatically to users
- How WordPress autosave can save plugin fields?
- 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 allowing for artists, events and venues
- How to remove duplicate Custom Fields?
- 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?
- Saving Custom Post types and fields to a custom table
- Custom Field Template seriously messed up in WP 3.1.1
- Carbon Fields use in custom plugin class
- How I can get custom field’s current value?
- UnWanted Custom field added in the wp page edit area
- Woocommerce – How to populate custom select field with stored values on checkout page?
- Implement Autocomplete for a custom field on WordPress Plugin Frontend
- How to query the custom fields by language?
- Assign / update custom field value for all posts (How can I assign only to posts without custom field value?)
- 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 to toggle between two custom fields in WordPress woocommerce ‘WC Product Field Group’ plugin?
- How to create an input field, and base the output on spreadsheet data? [closed]
- How do I hide posts across all loops based on the value of a custom field?
- Custom User meta field display
- Execute js files doesn’t seem to work
- WordPress metaboxes – textfield suggestion automatically populated
- Char limit on custom blog-post form? [closed]
- Unable to select image using custom image field type
- Redirect to another page using contact form 7? [closed]
- Every new post/draft has a custom field variable “yst_is_cornerstone” showing
- Custom Post Type Fields
- Taxonomy question
- 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
- Problem with conditional woocommerce custom checkout field
- 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
- Add custom field for users
- 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
- Need help getting a certain value out of a multi dimensional array
- Creating a user ‘add custom field’ section
- What method should I use for a sidebar widget that reads latest posts?
- 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
- ACF: Hide a div or template section when a custom field (in a field group) is empty
- How ACF Advanced Custom Field works with Woocommerce Single Product [closed]
- How do I add custom fields to the “Edit page” admin screen?
- Displaying Random Image from ACF Options Page [closed]
- A plugin for software reviews site like this one?
- Need help saving input fields for Security Deposit plugin in WC Vendors page
- Adding a variable to a meta field in the backend?
- Integrating WordPress Content into a jQuery Slider
- ACF: Not displaying ACF data from another post
- Order shipped by which driver[hook for woocoomerce order staus changed and popup in admin panel ] [closed]
- How to change data format in custom meta box field [closed]
- 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
- Is there a plugin or another way that can help me find out the underlying files of a page/post? [closed]
- 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
- how to compare date meta value in jet smart filter Date query?
- Issue using form in Google app in mobile
- How to filter posts with a wp query by a custom dropdown type field with the magic fields plugin
- 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
- Help Needed: Issue with Change Permalink on DirectoryPress Listing Pages
- Custom Dynamic Tag in Elementor not showing image