Hello I applied the code I found here. But I can’t figure out how can I call this image on frontend. I tried this so far: but I guess this is not the correct way to get the image link from the custom metabox. Any suggestions? Thanks in advance. Answer You get the photo ID from get_post_meta So the next
Tag: custom-fields
Hide product stock for certain products on single product pages in WooCommerce
I try to add a option to hide the product stock info but only on certain single product pages. We do not want to hide this info for every product. We want to have a option in the product edit view where we can select if this should be the case for that current product. Unfortunately my code below is
How to reorder additional fields on checkout page in WooCommerce
I cant figure out how to reorder the additional fields, on the checkout page in WooCommerce. I have added one extra field to the WooCommerce additional information section. I would like to show the time field first then the order notes below it. This is the code that I am using: However, this does not have the desired result. Can
Show/hide custom field based on a select field with validation in WooCommerce checkout
I have added a custom select field and a custom text field on the checkout page in WooCommerce using the code below. I want to hide this text field by default and it should only be visible when the “Referral Program” option is selected from the select field Here is my code, which works. Except that the textfield is always
Add, update or remove product custom field in WooCommerce
I use the following lines to save a Value to the database. I have one question regarding this code, when I delete input it still keeps it. The only way to delete that is to put (space) as input. $…
Woocommerce Additional Information Tab: Adding product custom field value
I have the following code working to create the Additional information tab in woocommerce with my own values however I want to pull the information from the built-in product custom field. This is the current code I use to output the custom field, how do I output this in Value 1 in functions.php file in the working code above? Answer
How to display sub field (image) with shortcode in WordPress?
These are the custom fields composition: 1 Group Footer 1.1 Group Col2 1.1.1 bbcimg (this is the image ID) 1.1.2 bbc-rss (this is the RSS feed ID) I have the following code displaying the bbc-rss: <…
Disable add to cart button via custom checkbox in WooCommerce product settings
We want to prevent add to cart for certain upcoming products. We want to have a checkbox to select the specific product on which we want to prevent add to cart. We have right now the checkbox and save code. I also found this: Remove add cart button in Woocommerce for a specific product category and https://wisdmlabs.com/blog/the-right-way-to-hide-add-to-cart-button-in-woocommerce/ I’m not sure,
Add and display custom cart item data in WooCommerce orders and emails
I have a custom woocommerce product type called lottery. I needed a custom select field on it (because it’s not a variable product) So I added one. Everything is working nice i’m getting the value in the cart and in the checkout too, but I cannot get the value in the admin order or in the order mails (clients and
add specific text to a customm fields with php (wordpress)
I want to add text “Genre:” to the beginning of this custom field the reason that i dont simply add something like this is that i dont want to this text be shown when there isnt this field for a post Answer You can check if the field exists and then display your HTML element.